On 06/12/2018 01:41 PM, Greg Kurz wrote: > On Tue, 12 Jun 2018 12:11:35 +0200 > Cédric Le Goater <c...@kaod.org> wrote: > >> On CentOS 7.5, gcc-4.8.5-28.el7_5.1.ppc64le fails to build QEMU due to : >> >> hw/intc/xics_kvm.c: In function ‘ics_set_kvm_state’: >> hw/intc/xics_kvm.c:281:13: error: ‘ret’ may be used uninitialized in this >> function [-Werror=maybe-uninitialized] >> return ret; >> >> Fix the breakage and also remove the extra error reporting as >> kvm_device_access() already provides a substantial error message. >> >> Signed-off-by: Cédric Le Goater <c...@kaod.org> >> --- >> >> Greg, can you please test ? RHEL7.5 does not catch the issue with the >> same compiler level :/ I don't understand why. >> > > This fixes the build breakage for me. Now this should really be squashed > into your original patch to preserve bisect on master.
After some analysis, you need to configure with '--enable-debug' to reproduce the breakage. '--enable-debug' removes -O2. With -O2, the compiler doesn't catch the error. It looks very much like a gcc issue to me. Thanks, C.