]> git.proxmox.com Git - mirror_qemu.git/commit
ppc: switch to constants within BUILD_BUG_ON
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 27 Jan 2017 16:27:16 +0000 (18:27 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 31 Jan 2017 03:04:06 +0000 (14:04 +1100)
commit25e6a11832bcd0715068f0cc24fb46ec03de676e
treebec81ce27a36dc09cbba58b2d549efce13823242
parentc636367311e892a9c5b93eaf53f59091729266e7
ppc: switch to constants within BUILD_BUG_ON

We are switching BUILD_BUG_ON to verify that it's parameter is a
compile-time constant, and it turns out that some gcc versions
(specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609) are
not smart enough to figure it out for expressions involving local
variables. This is harmless but means that the check is ineffective for
these platforms.  To fix, replace the variable with macros.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
[dwg: Correct a printf format warning]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c