Skip to contentSkip to conversation

Build error with git commit 8eb29f1bf5a974dc4c11d2d1f5e7c7f7a62be116 on x86_64

Qemu-devel Andrew Randrianasulu 5 participants 12 messages Feb 23, 2019 – Feb 26, 2019

lore
Share & tools
lore
#0 lore raw

Hello!

I just pulled latest git

up to
commit 8eb29f1bf5a974dc4c11d2d1f5e7c7f7a62be116 (HEAD -> master, origin/master, origin/HEAD)
Merge: a05838cb2a 2b6326c0bf
Author: Peter Maydell <[email protected]>
Date: Fri Feb 22 15:48:04 2019 +0000

Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20190221.0'
into staging

VFIO updates 2019-02-21

- Workaround kernel overflow bug in vfio type1 DMA unmap (Alex Williamson)

- Refactor vfio container initialization (Eric Auger)

# gpg: Signature made Fri 22 Feb 2019 05:21:07 GMT
# gpg: using RSA key 239B9B6E3BB08B22
# gpg: Good signature from "Alex Williamson <[email protected]>"
[full]

    # gpg:                 aka "Alex Williamson <[email protected]>" [full]
    # gpg:                 aka "Alex Williamson <[email protected]>" [full]
    # gpg:                 aka "Alex Williamson <[email protected]>" 
[full]
    # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 

8B22

* remotes/awilliam/tags/vfio-updates-20190221.0:
hw/vfio/common: Refactor container initialization vfio/common: Work around kernel overflow bug in DMA unmap

-----------------

and default build with simple ./configure on slackware 14.2 x86-64 box failed like this:

root@slax:~/src/qemu# LANG=C make -j 5
        CHK version_gen.h
  CC      qobject/block-qdict.o
  CC      util/thread-pool.o
  CC      util/main-loop.o
  CC      util/qemu-timer.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:9: error: 'subqdict' may be used uninitialized in this 
function [-Werror=maybe-uninitialized]
         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
         ^
  CC      util/compatfd.o
  CC      util/event_notifier-posix.o
cc1: all warnings being treated as errors
/root/src/qemu/rules.mak:69: recipe for target 'qobject/block-qdict.o' failed
make: *** [qobject/block-qdict.o] Error 1
make: *** Waiting for unfinished jobs....
----------------

LANG=C gcc --version
gcc (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

---------------

#1 lore raw

Adding people in cc based on 'scripts/get-maintainer.pl -f qobject/block-qdict.c'

Quoted 15 lines · Andrew Randrianasulu

Hello!

I just pulled latest git

up to
commit 8eb29f1bf5a974dc4c11d2d1f5e7c7f7a62be116 (HEAD -> master, origin/master, origin/HEAD)
Merge: a05838cb2a 2b6326c0bf
Author: Peter Maydell <[email protected]>
Date: Fri Feb 22 15:48:04 2019 +0000

and default build with simple ./configure on slackware 14.2 x86-64 box failed like this:

Quoted 5 lines

qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:9: error: 'subqdict' may be used uninitialized in this function [-Werror=maybe-uninitialized]

         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
         ^

Appears to be a false positive, but one that the compiler can't see through (that is, subqdict is only used if subqobj is NULL, but proving that all code paths either set subqobj or subqdict is not trivial for the compiler). I suspect this would fix it.

qobject/block-qdict.c +1 -1
index 1487cc5dd8b..b26524429c0 100644
@@ -224,7 +224,7 @@ void qdict_array_split(QDict *src, QList **dst)
     for (i = 0; i < UINT_MAX; i++) {
         QObject *subqobj;
         bool is_subqdict;
-        QDict *subqdict;
+        QDict *subqdict = NULL;
         char indexstr[32], prefix[32];
         size_t snprintf_ret;
 
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
#2 lore raw
In reply to Andrew Randrianasulu

Hi Andrew,

Quoted 4 lines · Andrew Randrianasulu

Hello!

I just pulled latest git

[...]

Quoted 4 lines

and default build with simple ./configure on slackware 14.2 x86-64 box failed like this:

Quoted 13 lines
root@slax:~/src/qemu# LANG=C make -j 5
        CHK version_gen.h
  CC      qobject/block-qdict.o
  CC      util/thread-pool.o
  CC      util/main-loop.o
  CC      util/qemu-timer.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:9: error: 'subqdict' may be used uninitialized in this 
function [-Werror=maybe-uninitialized]
         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
         ^

That's odd, I can not reproduce with a simple ./configure:

$ cat /etc/slackware-version
Slackware 14.2
$ gcc --version
gcc (GCC) 5.5.0
Quoted 5 lines

LANG=C gcc --version
gcc (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

#3 lore raw

В сообщении от Monday 25 February 2019 19:19:01 Philippe Mathieu-Daudc3a9 написал(а):

Quoted 26 lines

Hi Andrew,

Quoted 3 lines · Andrew Randrianasulu

Hello!

I just pulled latest git

[...]

Quoted 16 lines

and default build with simple ./configure on slackware 14.2 x86-64 box failed like this:

root@slax:~/src/qemu# LANG=C make -j 5
        CHK version_gen.h
  CC      qobject/block-qdict.o
  CC      util/thread-pool.o
  CC      util/main-loop.o
  CC      util/qemu-timer.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:9: error: 'subqdict' may be used uninitialized
in this function [-Werror=maybe-uninitialized]
         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
         ^
Quoted 8 lines

That's odd, I can not reproduce with a simple ./configure:

$ cat /etc/slackware-version
Slackware 14.2
$ gcc --version
gcc (GCC) 5.5.0

Well, then may be this is false positive, right now another qemu instance is busy inside same chroot, will try patch posted in earlier mail (after removing CFLAG I added for compiling qemu at all after this error).

Thanks for trying to reproduce.

Quoted 6 lines
Quoted 6 lines

LANG=C gcc --version
gcc (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

#4 lore raw
Quoted 37 lines · Andrew Randrianasulu

В сообщении от Monday 25 February 2019 19:19:01 Philippe Mathieu-Daudc3a9 написал(а):

Quoted 26 lines

Hi Andrew,

Quoted 3 lines · Andrew Randrianasulu

Hello!

I just pulled latest git

[...]

Quoted 16 lines

and default build with simple ./configure on slackware 14.2 x86-64 box failed like this:

root@slax:~/src/qemu# LANG=C make -j 5
        CHK version_gen.h
  CC      qobject/block-qdict.o
  CC      util/thread-pool.o
  CC      util/main-loop.o
  CC      util/qemu-timer.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:9: error: 'subqdict' may be used uninitialized
in this function [-Werror=maybe-uninitialized]
         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
         ^
Quoted 8 lines

That's odd, I can not reproduce with a simple ./configure:

$ cat /etc/slackware-version
Slackware 14.2
$ gcc --version
gcc (GCC) 5.5.0
Quoted 5 lines

Well, then may be this is false positive, right now another qemu instance is busy inside same chroot, will try patch posted in earlier mail (after removing CFLAG I added for compiling qemu at all after this error).

Thanks for trying to reproduce.

Just to be sure: You don't compile with -O3 or -O1 or -O0 in the CFLAGS here, do you?

Thomas

#5 lore raw

В сообщении от Tuesday 26 February 2019 11:54:12 вы написали:

Quoted 38 lines · Andrew Randrianasulu
Quoted 37 lines

В сообщении от Monday 25 February 2019 19:19:01 Philippe Mathieu-Daudc3a9

написал(а):

Quoted 33 lines

Hi Andrew,

Quoted 3 lines · Andrew Randrianasulu

Hello!

I just pulled latest git

[...]

Quoted 16 lines

and default build with simple ./configure on slackware 14.2 x86-64 box failed like this:

root@slax:~/src/qemu# LANG=C make -j 5
        CHK version_gen.h
  CC      qobject/block-qdict.o
  CC      util/thread-pool.o
  CC      util/main-loop.o
  CC      util/qemu-timer.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:9: error: 'subqdict' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
         ^

That's odd, I can not reproduce with a simple ./configure:

$ cat /etc/slackware-version
Slackware 14.2
$ gcc --version
gcc (GCC) 5.5.0
Quoted 8 lines
Quoted 5 lines

Well, then may be this is false positive, right now another qemu instance is busy inside same chroot, will try patch posted in earlier mail (after removing CFLAG I added for compiling qemu at all after this error).

Thanks for trying to reproduce.

Just to be sure: You don't compile with -O3 or -O1 or -O0 in the CFLAGS here, do you?

This time it was -O3, but I got some corruption in ppc64le guest's X, so I plan to revert this -O3 back to default ....

another qemu still busy compiling kernel (modified Alpine linux ppc64le config), and also Cinelerra-GG (video editor I'm hacking on), so I hope whole thing will be finished ..in day or so.

Quoted 2 lines

Thomas

#6 lore raw
Quoted 43 lines · Andrew Randrianasulu

В сообщении от Tuesday 26 February 2019 11:54:12 вы написали:

Quoted 42 lines · Andrew Randrianasulu
Quoted 41 lines

В сообщении от Monday 25 February 2019 19:19:01 Philippe Mathieu-Daudc3a9

написал(а):

Quoted 26 lines

Hi Andrew,

Quoted 3 lines · Andrew Randrianasulu

Hello!

I just pulled latest git

[...]

Quoted 16 lines

and default build with simple ./configure on slackware 14.2 x86-64 box failed like this:

root@slax:~/src/qemu# LANG=C make -j 5
        CHK version_gen.h
  CC      qobject/block-qdict.o
  CC      util/thread-pool.o
  CC      util/main-loop.o
  CC      util/qemu-timer.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:9: error: 'subqdict' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
         ^
Quoted 7 lines

That's odd, I can not reproduce with a simple ./configure:

$ cat /etc/slackware-version
Slackware 14.2
$ gcc --version
gcc (GCC) 5.5.0

Well, then may be this is false positive, right now another qemu instance is busy inside same chroot, will try patch posted in earlier mail (after removing CFLAG I added for compiling qemu at all after this error).

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Thanks for trying to reproduce.

Just to be sure: You don't compile with -O3 or -O1 or -O0 in the CFLAGS here, do you?

This time it was -O3, but I got some corruption in ppc64le guest's X, so I plan to revert this -O3 back to default ....

Ok, then that's the problem here: GCC often produces some additional "may be unused" warnings with -O3, and we normally only guarantee that QEMU compiles without warnings when using the standard -O2 optimization level.
So if you want to compile with -O3, you also have to specify --disable-werror (or add -Wno-error=maybe-unitialized to the CFLAGS). But unless you have really an urgent need for O3, I'd rather recommend to compile with the well-tested O2 optimization level instead.

Thomas

#7 lore raw

В сообщении от Tuesday 26 February 2019 12:05:02 Thomas Huth написал(а):

Quoted 54 lines · Andrew Randrianasulu
Quoted 45 lines

В сообщении от Tuesday 26 February 2019 11:54:12 вы написали:

Quoted 44 lines · Andrew Randrianasulu
Quoted 43 lines

В сообщении от Monday 25 February 2019 19:19:01 Philippe Mathieu-Daudc3a9

написал(а):

Quoted 26 lines

Hi Andrew,

Quoted 3 lines · Andrew Randrianasulu

Hello!

I just pulled latest git

[...]

Quoted 16 lines

and default build with simple ./configure on slackware 14.2 x86-64 box failed like this:

root@slax:~/src/qemu# LANG=C make -j 5
        CHK version_gen.h
  CC      qobject/block-qdict.o
  CC      util/thread-pool.o
  CC      util/main-loop.o
  CC      util/qemu-timer.o
  CC      util/iohandler.o
  CC      util/aio-posix.o
qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:9: error: 'subqdict' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
         ^
Quoted 7 lines

That's odd, I can not reproduce with a simple ./configure:

$ cat /etc/slackware-version
Slackware 14.2
$ gcc --version
gcc (GCC) 5.5.0

Well, then may be this is false positive, right now another qemu instance is busy inside same chroot, will try patch posted in earlier mail (after removing CFLAG I added for compiling qemu at all after this error).

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Thanks for trying to reproduce.

Just to be sure: You don't compile with -O3 or -O1 or -O0 in the CFLAGS here, do you?

This time it was -O3, but I got some corruption in ppc64le guest's X, so I plan to revert this -O3 back to default ....

Quoted 8 lines

Ok, then that's the problem here: GCC often produces some additional "may be unused" warnings with -O3, and we normally only guarantee that QEMU compiles without warnings when using the standard -O2 optimization level.
So if you want to compile with -O3, you also have to specify --disable-werror (or add -Wno-error=maybe-unitialized to the CFLAGS). But unless you have really an urgent need for O3, I'd rather recommend to compile with the well-tested O2 optimization level instead.

Ok, will do ....

I was hoping for some speed-up in (mt)tcg based machines, because compiling big programs inside qemu obviously not ultrafast.

3916 root 20 0 5442m 2.8g 3396 R 213 24.0 2758:40 qemu-system-ppc

from 'top' on host.

But then, soon-to-be 4.0 qemu should be faster in general due to all those tcg optimizations, so -O3 really will be dropped on my side.

Still, I have more funny observations, like this blue screen with qemu's -vga virtio/cirrus was present even on 2.12+, but this probably offb bug (assumes BE when compiled for power?) .

And

root@slax:~/src/qemu# qemu-system-ppc64 -m 2G -display sdl,gl=on -smp 
3  -hda /mnt/alpine_disk.img -g 1120x832x24

somewhat resulted in 8-bit X display (xf86-video-fbdev over offb, i think. due to 'nomodeset' default in alpine kernel - another reason to recompile {first reason was es1370 audio device support} and alter some parameters..)

:)

In some sense this is cool, because I can see same problem with not loading png images into Cinelerra-GG itself, even on 8-bit display (without GLX and composite), but may be it was not intended.

will look into offb's sources ...

also, -g 1186x864x32 resulted in funnuy diagonal corruption even at firmware screen level, and probably same happening with x86-64/kvm guest if I select some less comon, but exposed via xrandr mode. (this bit for -vga std, default)

Quoted 2 lines

Thomas

#8 lore raw

On 26/02/2019 10.46, Andrew Randrianasulu wrote:
[...]

Quoted 3 lines

also, -g 1186x864x32 resulted in funnuy diagonal corruption even at firmware screen level, and probably same happening with x86-64/kvm guest if I select some less comon, but exposed via xrandr mode. (this bit for -vga std, default)

1186 is not dividable by 16 ... you likely meant 1184 instead?

Thomas

#9 lore raw

В сообщении от Tuesday 26 February 2019 12:58:11 вы написали:

Quoted 11 lines · Andrew Randrianasulu

[...]

Quoted 4 lines

also, -g 1186x864x32 resulted in funnuy diagonal corruption even at firmware screen level, and probably same happening with x86-64/kvm guest if I select some less comon, but exposed via xrandr mode. (this bit for -vga std, default)

1186 is not dividable by 16 ... you likely meant 1184 instead?

Thomas

yeah, just forgot exact number ..
not sure if it really bug or feature. Should qemu check (and enforce? or just warn about?) those parameters, if specific video driver can't cope with specific resolutions?

I also looked at offb sources:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/video/fbdev/offb.c?h=v5.0-rc8

hm, because by default stdvga initialized by openfrmware to truecolor mode (32 bpp), then I assume cmap hacks not really applicable in this case? I'll try to play with switch at line 446 and specifically 'case 32' at line 480 ...

#10 lore raw
In reply to Thomas Huth
Quoted 8 lines · Thomas Huth

Ok, then that's the problem here: GCC often produces some additional "may be unused" warnings with -O3, and we normally only guarantee that QEMU compiles without warnings when using the standard -O2 optimization level.
So if you want to compile with -O3, you also have to specify --disable-werror (or add -Wno-error=maybe-unitialized to the CFLAGS). But unless you have really an urgent need for O3, I'd rather recommend to compile with the well-tested O2 optimization level instead.

I think in general we should probably look at fixing warnings that occur at -O3 when they're reported to us, even if we don't habitually build that way. But, like using bleeding-edge versions of gcc or clang, if you use an odd set of optimization flags you might find you run into warnings we haven't seen yet and need to make them non-fatal with --disable-werror. (--disable-werror is the default for releases, so you'll only get compile failures if building from git.)

Actual "QEMU is broken when built with -O3" issues are definitely worth investigating since they imply either a QEMU bug or a compiler bug.

PS: in general -O3 is not necessarily going to generate better code than -O2 if used as a blanket optimization setting -- it can end up generating larger code that increases icache pressure. Probably best used carefully and when benchmarking shows that it's actually an improvement.

thanks
-- PMM

#11 lore raw
Quoted 10 lines · Peter Maydell
Quoted 8 lines · Thomas Huth

Ok, then that's the problem here: GCC often produces some additional "may be unused" warnings with -O3, and we normally only guarantee that QEMU compiles without warnings when using the standard -O2 optimization level.
So if you want to compile with -O3, you also have to specify --disable-werror (or add -Wno-error=maybe-unitialized to the CFLAGS). But unless you have really an urgent need for O3, I'd rather recommend to compile with the well-tested O2 optimization level instead.

Quoted 3 lines

I think in general we should probably look at fixing warnings that occur at -O3 when they're reported to us, even if we don't habitually build that way.

Have you ever tried building QEMU with -O3 (and --enable-werror)? That list ist looong, e.g. here are just the warnings when compiling aarch64:

qemu/block/vmdk.c: In function ‘vmdk_open_vmdk4’:
qemu/block/vmdk.c:741:9: warning: ‘extent’ may be used uninitialized in this function [-Wmaybe-uninitialized]

     ret = vmdk_init_tables(bs, extent, errp);
         ^
qemu/block/vmdk.c: In function ‘vmdk_open_sparse’:
qemu/block/vmdk.c:550:9: warning: ‘extent’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     ret = vmdk_init_tables(bs, extent, errp);
         ^
qemu/block/vmdk.c:529:17: note: ‘extent’ was declared here
     VmdkExtent *extent;
                 ^
qemu/block/vmdk.c: In function ‘vmdk_open_desc_file.isra.15’:
qemu/block/vmdk.c:893:39: warning: ‘extent’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             extent->flat_start_offset = flat_offset << 9;
                                       ^
qemu/block/vmdk.c:823:17: note: ‘extent’ was declared here
     VmdkExtent *extent;
                 ^
qemu/block/nbd-client.c: In function ‘nbd_co_request’:
qemu/block/nbd-client.c:608:8: warning: ‘local_reply.type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (chunk->type == NBD_REPLY_TYPE_NONE) {
        ^
qemu/block/nbd-client.c:573:14: note: ‘local_reply.type’ was declared here
     NBDReply local_reply;
              ^
qemu/block/nbd-client.c:614:22: warning: ‘local_reply.flags’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (chunk->flags & NBD_REPLY_FLAG_DONE) {
                      ^
qemu/block/nbd-client.c:573:14: note: ‘local_reply.flags’ was declared here
     NBDReply local_reply;
              ^
qemu/block/nbd-client.c:601:8: warning: ‘local_reply.<U3390>.magic’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (nbd_reply_is_simple(reply) || s->quit) {
        ^
qemu/block/nbd-client.c:573:14: note: ‘local_reply.<U3390>.magic’ was declared here
     NBDReply local_reply;
              ^
qemu/block/nbd-client.c: In function ‘nbd_client_co_preadv’:
qemu/block/nbd-client.c:209:8: warning: ‘reply.length’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (chunk->length != sizeof(offset) + sizeof(hole_size)) {
        ^
qemu/block/nbd-client.c:652:14: note: ‘reply.length’ was declared here
     NBDReply reply;
              ^
qemu/block/nbd-client.c:664:9: warning: ‘reply.type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         switch (chunk->type) {
         ^
qemu/block/nbd-client.c:652:14: note: ‘reply.type’ was declared here
     NBDReply reply;
              ^
qemu/block/nbd-client.c:614:22: warning: ‘reply.flags’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (chunk->flags & NBD_REPLY_FLAG_DONE) {
                      ^
qemu/block/nbd-client.c:652:14: note: ‘reply.flags’ was declared here
     NBDReply reply;
              ^
qemu/block/nbd-client.c: In function ‘nbd_client_co_block_status’:
qemu/block/nbd-client.c:241:8: warning: ‘reply.length’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (chunk->length != sizeof(context_id) + sizeof(*extent)) {
        ^
qemu/block/nbd-client.c:703:14: note: ‘reply.length’ was declared here
     NBDReply reply;
              ^
qemu/block/nbd-client.c:717:9: warning: ‘reply.type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         switch (chunk->type) {
         ^
qemu/block/nbd-client.c:703:14: note: ‘reply.type’ was declared here
     NBDReply reply;
              ^
qemu/block/nbd-client.c:614:22: warning: ‘reply.flags’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (chunk->flags & NBD_REPLY_FLAG_DONE) {
                      ^
qemu/block/nbd-client.c:703:14: note: ‘reply.flags’ was declared here
     NBDReply reply;
              ^
qemu/qobject/block-qdict.c: In function ‘qdict_array_split’:
qemu/qobject/block-qdict.c:259:25: warning: ‘subqdict’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
                         ^
qemu/hw/intc/i8259.c: In function ‘pic_read_irq’:
qemu/hw/intc/i8259.c:200:13: warning: ‘irq2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         irq = irq2 + 8;
             ^
qemu/migration/qemu-file.c: In function ‘qemu_get_buffer_in_place’:
qemu/migration/qemu-file.c:537:18: warning: ‘src’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             *buf = src;
                  ^
qemu/slirp/socket.c: In function ‘soread’:
qemu/slirp/socket.c:232:5: warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (n == 2 && nn == iov[0].iov_len) {
     ^
In file included from /usr/lib64/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from qemu/slirp/ip.h:36,
                 from qemu/slirp/slirp.h:50,
                 from qemu/slirp/socket.c:8:
qemu/slirp/socket.c: In function ‘soreadbuf’:
/usr/include/glib-2.0/glib/gmacros.h:300:39: warning: ‘iov.iov_len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
                                       ^
qemu/slirp/socket.c:253:15: note: ‘iov.iov_len’ was declared here
  struct iovec iov[2];
               ^
qemu/slirp/socket.c: In function ‘sorecvoob’:
qemu/slirp/socket.c:232:5: warning: ‘n’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (n == 2 && nn == iov[0].iov_len) {
     ^
qemu/slirp/socket.c:175:6: note: ‘n’ was declared here
  int n, nn;
      ^
qemu/gdbstub.c: In function ‘gdb_handle_packet’:
qemu/gdbstub.c:1655:17: warning: ‘tid’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             cpu = gdb_get_cpu(s, pid, tid);
                 ^
qemu/gdbstub.c:1655:17: warning: ‘pid’ may be used uninitialized in this function [-Wmaybe-uninitialized]
qemu/target/arm/translate-a64.c: In function ‘disas_simd_two_reg_misc_fp16’:
qemu/target/arm/translate-a64.c:12529:34: warning: ‘rmode’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         tcg_rmode = tcg_const_i32(arm_rmode_to_sf(rmode));
                                  ^

IIRC, most of the time, GCC is just wrong, so I really doubt that it is worth the effort to fix all of them ...

Thomas