qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/22] -Werror=maybe-uninitialized fixes
@ 2024-09-30  8:14 marcandre.lureau
  2024-09-30  8:14 ` [PATCH v3 01/22] util/coroutine: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
                   ` (22 more replies)
  0 siblings, 23 replies; 46+ messages in thread
From: marcandre.lureau @ 2024-09-30  8:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: Hanna Reitz, Christian Schoenebeck, Fam Zheng, Song Gao,
	Alex Bennée, Pierrick Bouvier, Mahmoud Mandour, qemu-block,
	Laurent Vivier, Philippe Mathieu-Daudé,
	Vladimir Sementsov-Ogievskiy, Greg Kurz, Eugenio Pérez,
	Gerd Hoffmann, Bin Meng, Fabiano Rosas, Eric Blake, Hyman Huang,
	Kevin Wolf, Stefano Garzarella, Michael S. Tsirkin,
	Alexandre Iooss, Marcel Apfelbaum, John Snow, Eduardo Habkost,
	Jesper Devantier, Peter Xu, Stefan Hajnoczi, Klaus Jensen,
	Keith Busch, Paolo Bonzini, Daniel P. Berrangé, Yuval Shaia,
	Bin Meng, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Depending on -Doptimization=<value>, GCC (14.2.1 here) produces different
maybe-uninitialized warnings:
- g: produces -Werror=maybe-uninitialized errors
- 0: clean build
- 1: produces -Werror=maybe-uninitialized errors
- 2: clean build
- 3: produces few -Werror=maybe-uninitialized errors
- s: produces -Werror=maybe-uninitialized errors

Most are false-positive, because prior LOCK_GUARD should guarantee an
initialization path. Few of them are a bit trickier. Finally, I found
a potential related memory leak.

Patches missing r-b: 6, 10-11, 15-21

thanks

v3:
 - some changes suggested by Manos
 - added s-o-b/a-b

v2:
 - rebased, dropped some patches
 - added some new patches with updated code-base and newer GCC
 - added s-o-b/a-b

Marc-André Lureau (22):
  util/coroutine: fix -Werror=maybe-uninitialized false-positive
  util/timer: fix -Werror=maybe-uninitialized false-positive
  hw/qxl: fix -Werror=maybe-uninitialized false-positives
  nbd: fix -Werror=maybe-uninitialized false-positive
  block/mirror: fix -Werror=maybe-uninitialized false-positive
  block/mirror: fix -Werror=maybe-uninitialized false-positive
  block/stream: fix -Werror=maybe-uninitialized false-positives
  hw/ahci: fix -Werror=maybe-uninitialized false-positive
  hw/vhost-scsi: fix -Werror=maybe-uninitialized
  hw/sdhci: fix -Werror=maybe-uninitialized false-positive
  block/block-copy: fix -Werror=maybe-uninitialized false-positive
  migration: fix -Werror=maybe-uninitialized false-positives
  hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive
  migration: fix -Werror=maybe-uninitialized false-positive
  linux-user/hppa: fix -Werror=maybe-uninitialized false-positive
  target/loongarch: fix -Werror=maybe-uninitialized false-positive
  tests: fix -Werror=maybe-uninitialized false-positive
  hw/virtio: fix -Werror=maybe-uninitialized
  RFC: hw/virtio: a potential leak fix
  block: fix -Werror=maybe-uninitialized false-positive
  qom/object: fix -Werror=maybe-uninitialized
  fsdep/9p: fix -Werror=maybe-uninitialized false-positive

 block/block-copy.c                 |  2 +-
 block/file-posix.c                 |  2 +-
 block/mirror.c                     |  8 ++++----
 block/stream.c                     |  6 +++---
 fsdev/9p-iov-marshal.c             |  6 +++---
 hw/block/virtio-blk.c              |  2 +-
 hw/display/qxl.c                   |  4 ++--
 hw/ide/ahci.c                      |  3 ++-
 hw/scsi/vhost-scsi.c               |  2 +-
 hw/sd/sdhci.c                      |  2 +-
 hw/virtio/vhost-shadow-virtqueue.c |  6 ++++--
 linux-user/hppa/cpu_loop.c         | 10 +++++-----
 migration/dirtyrate.c              |  4 ++--
 migration/migration.c              |  2 +-
 migration/ram.c                    |  2 +-
 nbd/client-connection.c            |  2 +-
 qom/object.c                       |  5 ++++-
 target/loongarch/gdbstub.c         | 26 ++++++++++++++------------
 tests/unit/test-bdrv-drain.c       |  2 +-
 tests/unit/test-block-iothread.c   |  2 +-
 util/qemu-coroutine.c              |  2 +-
 util/qemu-timer.c                  |  6 +++---
 roms/openbios                      |  2 +-
 23 files changed, 58 insertions(+), 50 deletions(-)

-- 
2.45.2.827.g557ae147e6



^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2024-10-02  8:33 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30  8:14 [PATCH v3 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 01/22] util/coroutine: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 02/22] util/timer: " marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 03/22] hw/qxl: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 04/22] nbd: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 05/22] block/mirror: " marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 06/22] " marcandre.lureau
2024-09-30  8:50   ` Vladimir Sementsov-Ogievskiy
2024-09-30  8:14 ` [PATCH v3 07/22] block/stream: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 08/22] hw/ahci: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 09/22] hw/vhost-scsi: fix -Werror=maybe-uninitialized marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-09-30 12:59   ` Alex Bennée
2024-09-30  8:14 ` [PATCH v3 11/22] block/block-copy: " marcandre.lureau
2024-09-30  8:51   ` Vladimir Sementsov-Ogievskiy
2024-09-30  8:14 ` [PATCH v3 12/22] migration: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 13/22] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 14/22] migration: " marcandre.lureau
2024-09-30  8:14 ` [PATCH v3 15/22] linux-user/hppa: " marcandre.lureau
2024-09-30 12:18   ` Laurent Vivier
2024-09-30 13:26     ` Marc-André Lureau
2024-10-01  9:20       ` Laurent Vivier
2024-09-30  8:14 ` [PATCH v3 16/22] target/loongarch: " marcandre.lureau
2024-10-01 13:31   ` Vladimir Sementsov-Ogievskiy
2024-09-30  8:14 ` [PATCH v3 17/22] tests: " marcandre.lureau
2024-09-30  8:53   ` Vladimir Sementsov-Ogievskiy
2024-09-30  8:14 ` [PATCH v3 18/22] hw/virtio: fix -Werror=maybe-uninitialized marcandre.lureau
2024-09-30  8:28   ` Stefano Garzarella
2024-09-30  8:14 ` [PATCH v3 19/22] RFC: hw/virtio: a potential leak fix marcandre.lureau
2024-09-30 11:02   ` Eugenio Perez Martin
2024-09-30 11:04     ` Eugenio Perez Martin
2024-09-30 11:29       ` Marc-André Lureau
2024-09-30  8:14 ` [PATCH v3 20/22] block: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-10-01 13:34   ` Vladimir Sementsov-Ogievskiy
2024-10-02  8:32   ` Kevin Wolf
2024-09-30  8:14 ` [PATCH v3 21/22] qom/object: fix -Werror=maybe-uninitialized marcandre.lureau
2024-10-01 14:04   ` Vladimir Sementsov-Ogievskiy
2024-10-01 15:22     ` Marc-André Lureau
2024-10-02  7:00       ` Vladimir Sementsov-Ogievskiy
2024-10-02  6:21   ` Markus Armbruster
2024-10-02  7:00     ` Marc-André Lureau
2024-10-02  7:08       ` Markus Armbruster
2024-09-30  8:14 ` [PATCH v3 22/22] fsdep/9p: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-09-30  9:26   ` Christian Schoenebeck via
2024-09-30  9:35     ` Marc-André Lureau
2024-10-01 13:27 ` [PATCH v3 00/22] -Werror=maybe-uninitialized fixes Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).