qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 00/22] -Werror=maybe-uninitialized fixes
@ 2024-10-02  8:36 marcandre.lureau
  2024-10-02  8:36 ` [PULL 01/22] util/coroutine: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
                   ` (22 more replies)
  0 siblings, 23 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Marc-André Lureau

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

The following changes since commit 718780d20470c66a3a36d036b29148d5809dc855:

  Merge tag 'pull-nvme-20241001' of https://gitlab.com/birkelund/qemu into staging (2024-10-01 11:34:07 +0100)

are available in the Git repository at:

  https://gitlab.com/marcandre.lureau/qemu.git tags/warn-pull-request

for you to fetch changes up to baad82ecfb27474f17f4318502725622ab7170fc:

  qom/object: fix -Werror=maybe-uninitialized (2024-10-02 11:36:12 +0400)

----------------------------------------------------------------
-Werror=maybe-uninitialized fixes

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

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
  hw/virtio: freeing leaked memory from vhost_svq_get_buf in
    vhost_svq_poll
  block: fix -Werror=maybe-uninitialized false-positive
  fsdep/9p: fix -Werror=maybe-uninitialized false-positive
  qom/object: fix -Werror=maybe-uninitialized

 block/block-copy.c                 |  2 +-
 block/file-posix.c                 |  2 +-
 block/mirror.c                     |  8 ++++----
 block/stream.c                     |  6 +++---
 fsdev/9p-iov-marshal.c             | 15 ++++++++++++---
 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         |  2 ++
 migration/dirtyrate.c              |  4 ++--
 migration/migration.c              |  2 +-
 migration/ram.c                    |  2 +-
 nbd/client-connection.c            |  2 +-
 qom/object.c                       |  2 +-
 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, 61 insertions(+), 45 deletions(-)

-- 
2.45.2.827.g557ae147e6



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

* [PULL 01/22] util/coroutine: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 02/22] util/timer: " marcandre.lureau
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Stefan Hajnoczi,
	Kevin Wolf

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

../util/qemu-coroutine.c:150:8: error: ‘batch’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 util/qemu-coroutine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c
index eb4eebefdf..64d6264fc7 100644
--- a/util/qemu-coroutine.c
+++ b/util/qemu-coroutine.c
@@ -136,7 +136,7 @@ static Coroutine *coroutine_pool_get_local(void)
 static void coroutine_pool_refill_local(void)
 {
     CoroutinePool *local_pool = get_ptr_local_pool();
-    CoroutinePoolBatch *batch;
+    CoroutinePoolBatch *batch = NULL;
 
     WITH_QEMU_LOCK_GUARD(&global_pool_lock) {
         batch = QSLIST_FIRST(&global_pool);
-- 
2.45.2.827.g557ae147e6



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

* [PULL 02/22] util/timer: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
  2024-10-02  8:36 ` [PULL 01/22] util/coroutine: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 03/22] hw/qxl: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Marc-André Lureau, Paolo Bonzini

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

../util/qemu-timer.c:198:24: error: ‘expire_time’ may be used uninitialized [-Werror=maybe-uninitialized]
../util/qemu-timer.c:476:8: error: ‘rearm’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 util/qemu-timer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/util/qemu-timer.c b/util/qemu-timer.c
index 6b1533bc2a..d5e33490fc 100644
--- a/util/qemu-timer.c
+++ b/util/qemu-timer.c
@@ -182,7 +182,7 @@ bool qemu_clock_has_timers(QEMUClockType type)
 
 bool timerlist_expired(QEMUTimerList *timer_list)
 {
-    int64_t expire_time;
+    int64_t expire_time = 0;
 
     if (!qatomic_read(&timer_list->active_timers)) {
         return false;
@@ -212,7 +212,7 @@ bool qemu_clock_expired(QEMUClockType type)
 int64_t timerlist_deadline_ns(QEMUTimerList *timer_list)
 {
     int64_t delta;
-    int64_t expire_time;
+    int64_t expire_time = 0;
 
     if (!qatomic_read(&timer_list->active_timers)) {
         return -1;
@@ -461,7 +461,7 @@ void timer_mod_ns(QEMUTimer *ts, int64_t expire_time)
 void timer_mod_anticipate_ns(QEMUTimer *ts, int64_t expire_time)
 {
     QEMUTimerList *timer_list = ts->timer_list;
-    bool rearm;
+    bool rearm = false;
 
     WITH_QEMU_LOCK_GUARD(&timer_list->active_timers_lock) {
         if (ts->expire_time == -1 || ts->expire_time > expire_time) {
-- 
2.45.2.827.g557ae147e6



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

* [PULL 03/22] hw/qxl: fix -Werror=maybe-uninitialized false-positives
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
  2024-10-02  8:36 ` [PULL 01/22] util/coroutine: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
  2024-10-02  8:36 ` [PULL 02/22] util/timer: " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:40   ` Thomas Huth
  2024-10-02  8:36 ` [PULL 04/22] nbd: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
                   ` (19 subsequent siblings)
  22 siblings, 1 reply; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Marc-André Lureau

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

../hw/display/qxl.c:1352:5: error: ‘pci_region’ may be used uninitialized [-Werror=maybe-uninitialized]
../hw/display/qxl.c:1365:22: error: ‘pci_start’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/display/qxl.c | 4 ++--
 roms/openbios    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 3c2b5182ca..0c4b1c9bf2 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1301,8 +1301,8 @@ static int qxl_add_memslot(PCIQXLDevice *d, uint32_t slot_id, uint64_t delta,
     };
     uint64_t guest_start;
     uint64_t guest_end;
-    int pci_region;
-    pcibus_t pci_start;
+    int pci_region = -1;
+    pcibus_t pci_start = PCI_BAR_UNMAPPED;
     pcibus_t pci_end;
     MemoryRegion *mr;
     intptr_t virt_start;
diff --git a/roms/openbios b/roms/openbios
index c3a19c1e54..af97fd7af5 160000
--- a/roms/openbios
+++ b/roms/openbios
@@ -1 +1 @@
-Subproject commit c3a19c1e54977a53027d6232050e1e3e39a98a1b
+Subproject commit af97fd7af5e7c18f591a7b987291d3db4ffb28b5
-- 
2.45.2.827.g557ae147e6



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

* [PULL 04/22] nbd: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (2 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 03/22] hw/qxl: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 05/22] block/mirror: " marcandre.lureau
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Eric Blake,
	Vladimir Sementsov-Ogievskiy, open list:Network Block Dev...

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

../nbd/client-connection.c:419:8: error: ‘wait_co’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 nbd/client-connection.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nbd/client-connection.c b/nbd/client-connection.c
index f9da67c87e..b11e266807 100644
--- a/nbd/client-connection.c
+++ b/nbd/client-connection.c
@@ -410,7 +410,7 @@ nbd_co_establish_connection(NBDClientConnection *conn, NBDExportInfo *info,
  */
 void nbd_co_establish_connection_cancel(NBDClientConnection *conn)
 {
-    Coroutine *wait_co;
+    Coroutine *wait_co = NULL;
 
     WITH_QEMU_LOCK_GUARD(&conn->mutex) {
         wait_co = g_steal_pointer(&conn->wait_co);
-- 
2.45.2.827.g557ae147e6



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

* [PULL 05/22] block/mirror: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (3 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 04/22] nbd: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 06/22] " marcandre.lureau
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, John Snow,
	Vladimir Sementsov-Ogievskiy, Kevin Wolf, Hanna Reitz,
	open list:Block Jobs

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

../block/mirror.c:1066:22: error: ‘iostatus’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 block/mirror.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/mirror.c b/block/mirror.c
index 61f0a717b7..54e3a7ea9d 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -931,7 +931,7 @@ static int coroutine_fn mirror_run(Job *job, Error **errp)
     MirrorBDSOpaque *mirror_top_opaque = s->mirror_top_bs->opaque;
     BlockDriverState *target_bs = blk_bs(s->target);
     bool need_drain = true;
-    BlockDeviceIoStatus iostatus;
+    BlockDeviceIoStatus iostatus = BLOCK_DEVICE_IO_STATUS__MAX;
     int64_t length;
     int64_t target_length;
     BlockDriverInfo bdi;
-- 
2.45.2.827.g557ae147e6



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

* [PULL 06/22] block/mirror: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (4 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 05/22] block/mirror: " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 07/22] block/stream: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, John Snow,
	Vladimir Sementsov-Ogievskiy, Kevin Wolf, Hanna Reitz,
	open list:Block Jobs

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

../block/mirror.c:404:5: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]
../block/mirror.c:895:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]
../block/mirror.c:578:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]

Change a variable to int, as suggested by Manos: "bdrv_co_preadv()
which is int and is passed as an int argument to mirror_read_complete()"

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 block/mirror.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/mirror.c b/block/mirror.c
index 54e3a7ea9d..2afe700b4d 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -349,7 +349,7 @@ static void coroutine_fn mirror_co_read(void *opaque)
     MirrorOp *op = opaque;
     MirrorBlockJob *s = op->s;
     int nb_chunks;
-    uint64_t ret;
+    int ret = -1;
     uint64_t max_bytes;
 
     max_bytes = s->granularity * s->max_iov;
@@ -565,7 +565,7 @@ static void coroutine_fn GRAPH_UNLOCKED mirror_iteration(MirrorBlockJob *s)
 
     bitmap_set(s->in_flight_bitmap, offset / s->granularity, nb_chunks);
     while (nb_chunks > 0 && offset < s->bdev_length) {
-        int ret;
+        int ret = -1;
         int64_t io_bytes;
         int64_t io_bytes_acct;
         MirrorMethod mirror_method = MIRROR_METHOD_COPY;
@@ -841,7 +841,7 @@ static int coroutine_fn GRAPH_UNLOCKED mirror_dirty_init(MirrorBlockJob *s)
     int64_t offset;
     BlockDriverState *bs;
     BlockDriverState *target_bs = blk_bs(s->target);
-    int ret;
+    int ret = -1;
     int64_t count;
 
     bdrv_graph_co_rdlock();
-- 
2.45.2.827.g557ae147e6



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

* [PULL 07/22] block/stream: fix -Werror=maybe-uninitialized false-positives
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (5 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 06/22] " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 08/22] hw/ahci: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, John Snow,
	Vladimir Sementsov-Ogievskiy, Kevin Wolf, Hanna Reitz,
	open list:Block Jobs

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

../block/stream.c:193:19: error: ‘unfiltered_bs’ may be used uninitialized [-Werror=maybe-uninitialized]
../block/stream.c:176:5: error: ‘len’ may be used uninitialized [-Werror=maybe-uninitialized]
trace/trace-block.h:906:9: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 block/stream.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/stream.c b/block/stream.c
index 7031eef12b..9076203193 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -155,8 +155,8 @@ static void stream_clean(Job *job)
 static int coroutine_fn stream_run(Job *job, Error **errp)
 {
     StreamBlockJob *s = container_of(job, StreamBlockJob, common.job);
-    BlockDriverState *unfiltered_bs;
-    int64_t len;
+    BlockDriverState *unfiltered_bs = NULL;
+    int64_t len = -1;
     int64_t offset = 0;
     int error = 0;
     int64_t n = 0; /* bytes */
@@ -177,7 +177,7 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
 
     for ( ; offset < len; offset += n) {
         bool copy;
-        int ret;
+        int ret = -1;
 
         /* Note that even when no rate limit is applied we need to yield
          * with no pending I/O here so that bdrv_drain_all() returns.
-- 
2.45.2.827.g557ae147e6



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

* [PULL 08/22] hw/ahci: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (6 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 07/22] block/stream: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 09/22] hw/vhost-scsi: fix -Werror=maybe-uninitialized marcandre.lureau
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, John Snow, open list:IDE

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

../hw/ide/ahci.c:989:58: error: ‘tbl_entry_size’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/ide/ahci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 7fc2a08df2..0eb24304ee 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -948,7 +948,6 @@ static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist,
     uint64_t sum = 0;
     int off_idx = -1;
     int64_t off_pos = -1;
-    int tbl_entry_size;
     IDEBus *bus = &ad->port;
     BusState *qbus = BUS(bus);
 
@@ -976,6 +975,8 @@ static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist,
     /* Get entries in the PRDT, init a qemu sglist accordingly */
     if (prdtl > 0) {
         AHCI_SG *tbl = (AHCI_SG *)prdt;
+        int tbl_entry_size = 0;
+
         sum = 0;
         for (i = 0; i < prdtl; i++) {
             tbl_entry_size = prdt_tbl_entry_size(&tbl[i]);
-- 
2.45.2.827.g557ae147e6



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

* [PULL 09/22] hw/vhost-scsi: fix -Werror=maybe-uninitialized
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (7 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 08/22] hw/ahci: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Paolo Bonzini, Fam Zheng,
	Michael S. Tsirkin, Stefano Garzarella

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

../hw/scsi/vhost-scsi.c:173:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]

It can be reached when num_queues=0. It probably doesn't make much sense
to instantiate a vhost-scsi with 0 IO queues though. For now, make
vhost_scsi_set_workers() return success/0 anyway, when no workers have
been setup.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
---
 hw/scsi/vhost-scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 49cff2a0cb..22d16dc26b 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -172,7 +172,7 @@ static int vhost_scsi_set_workers(VHostSCSICommon *vsc, bool per_virtqueue)
     struct vhost_dev *dev = &vsc->dev;
     struct vhost_vring_worker vq_worker;
     struct vhost_worker_state worker;
-    int i, ret;
+    int i, ret = 0;
 
     /* Use default worker */
     if (!per_virtqueue || dev->nvqs == VHOST_SCSI_VQ_NUM_FIXED + 1) {
-- 
2.45.2.827.g557ae147e6



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

* [PULL 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (8 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 09/22] hw/vhost-scsi: fix -Werror=maybe-uninitialized marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 11/22] block/block-copy: " marcandre.lureau
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau,
	Philippe Mathieu-Daudé, Bin Meng, open list:SD (Secure Card)

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

../hw/sd/sdhci.c:846:16: error: ‘res’ may be used uninitialized [-Werror=maybe-uninitialized]

False-positive, because "length" is non-null.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
---
 hw/sd/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 87122e4245..ed01499391 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -747,7 +747,7 @@ static void sdhci_do_adma(SDHCIState *s)
     const uint16_t block_size = s->blksize & BLOCK_SIZE_MASK;
     const MemTxAttrs attrs = { .memory = true };
     ADMADescr dscr = {};
-    MemTxResult res;
+    MemTxResult res = MEMTX_ERROR;
     int i;
 
     if (s->trnmod & SDHC_TRNS_BLK_CNT_EN && !s->blkcnt) {
-- 
2.45.2.827.g557ae147e6



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

* [PULL 11/22] block/block-copy: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (9 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 12/22] migration: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, John Snow,
	Vladimir Sementsov-Ogievskiy, Kevin Wolf, Hanna Reitz,
	open list:Block Jobs

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

../block/block-copy.c:591:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 block/block-copy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/block-copy.c b/block/block-copy.c
index 93eb1b2664..eddb0b81e0 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -584,7 +584,7 @@ static coroutine_fn int block_copy_task_entry(AioTask *task)
     BlockCopyState *s = t->s;
     bool error_is_read = false;
     BlockCopyMethod method = t->method;
-    int ret;
+    int ret = -1;
 
     WITH_GRAPH_RDLOCK_GUARD() {
         ret = block_copy_do_copy(s, t->req.offset, t->req.bytes, &method,
-- 
2.45.2.827.g557ae147e6



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

* [PULL 12/22] migration: fix -Werror=maybe-uninitialized false-positives
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (10 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 11/22] block/block-copy: " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 13/22] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Hyman Huang, Peter Xu,
	Fabiano Rosas

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

../migration/dirtyrate.c:186:5: error: ‘records’ may be used uninitialized [-Werror=maybe-uninitialized]
../migration/dirtyrate.c:168:12: error: ‘gen_id’ may be used uninitialized [-Werror=maybe-uninitialized]
../migration/migration.c:2273:5: error: ‘file’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Hyman Huang <yong.huang@smartx.com>
---
 migration/dirtyrate.c | 4 ++--
 migration/migration.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
index 5478d58de3..233acb0855 100644
--- a/migration/dirtyrate.c
+++ b/migration/dirtyrate.c
@@ -149,12 +149,12 @@ int64_t vcpu_calculate_dirtyrate(int64_t calc_time_ms,
                                  unsigned int flag,
                                  bool one_shot)
 {
-    DirtyPageRecord *records;
+    DirtyPageRecord *records = NULL;
     int64_t init_time_ms;
     int64_t duration;
     int64_t dirtyrate;
     int i = 0;
-    unsigned int gen_id;
+    unsigned int gen_id = 0;
 
 retry:
     init_time_ms = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
diff --git a/migration/migration.c b/migration/migration.c
index ae2be31557..021faee2f3 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2278,7 +2278,7 @@ static bool migrate_handle_rp_resume_ack(MigrationState *s,
  */
 static void migration_release_dst_files(MigrationState *ms)
 {
-    QEMUFile *file;
+    QEMUFile *file = NULL;
 
     WITH_QEMU_LOCK_GUARD(&ms->qemu_file_lock) {
         /*
-- 
2.45.2.827.g557ae147e6



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

* [PULL 13/22] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (11 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 12/22] migration: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 14/22] migration: " marcandre.lureau
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Stefan Hajnoczi,
	Michael S. Tsirkin, Kevin Wolf, Hanna Reitz, open list:virtio-blk

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

../hw/block/virtio-blk.c:1212:12: error: ‘rq’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
---
 hw/block/virtio-blk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 115795392c..9166d7974d 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -1060,7 +1060,7 @@ static void virtio_blk_dma_restart_cb(void *opaque, bool running,
     VirtIOBlock *s = opaque;
     uint16_t num_queues = s->conf.num_queues;
     g_autofree VirtIOBlockReq **vq_rq = NULL;
-    VirtIOBlockReq *rq;
+    VirtIOBlockReq *rq = NULL;
 
     if (!running) {
         return;
-- 
2.45.2.827.g557ae147e6



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

* [PULL 14/22] migration: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (12 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 13/22] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 15/22] linux-user/hppa: " marcandre.lureau
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Marc-André Lureau, Peter Xu, Fabiano Rosas

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

../migration/ram.c:1873:23: error: ‘dirty’ may be used uninitialized [-Werror=maybe-uninitialized]

When 'block' != NULL, 'dirty' is initialized.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/ram.c b/migration/ram.c
index 81eda2736a..326ce7eb79 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1793,7 +1793,7 @@ static bool get_queued_page(RAMState *rs, PageSearchStatus *pss)
 {
     RAMBlock  *block;
     ram_addr_t offset;
-    bool dirty;
+    bool dirty = false;
 
     do {
         block = unqueue_page(rs, &offset);
-- 
2.45.2.827.g557ae147e6



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

* [PULL 15/22] linux-user/hppa: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (13 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 14/22] migration: " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 16/22] target/loongarch: " marcandre.lureau
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Marc-André Lureau, Laurent Vivier

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

../linux-user/hppa/cpu_loop.c: In function ‘hppa_lws’:
../linux-user/hppa/cpu_loop.c:106:17: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]
  106 |     env->gr[28] = ret;

Add g_assert_not_reached() to help compiler, as suggested by Laurent.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/hppa/cpu_loop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c
index bc093b8fe8..23b38ff9b2 100644
--- a/linux-user/hppa/cpu_loop.c
+++ b/linux-user/hppa/cpu_loop.c
@@ -99,6 +99,8 @@ static abi_ulong hppa_lws(CPUHPPAState *env)
 #endif
             }
             break;
+        default:
+            g_assert_not_reached();
         }
         break;
     }
-- 
2.45.2.827.g557ae147e6



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

* [PULL 16/22] target/loongarch: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (14 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 15/22] linux-user/hppa: " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 17/22] tests: " marcandre.lureau
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Marc-André Lureau, Song Gao

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

../target/loongarch/gdbstub.c:55:20: error: ‘val’ may be used uninitialized [-Werror=maybe-uninitialized]
   55 |             return gdb_get_reg32(mem_buf, val);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../target/loongarch/gdbstub.c:39:18: note: ‘val’ was declared here
   39 |         uint64_t val;

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 target/loongarch/gdbstub.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/target/loongarch/gdbstub.c b/target/loongarch/gdbstub.c
index 7ca245ee81..3a03cf9cba 100644
--- a/target/loongarch/gdbstub.c
+++ b/target/loongarch/gdbstub.c
@@ -34,26 +34,28 @@ void write_fcc(CPULoongArchState *env, uint64_t val)
 int loongarch_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
 {
     CPULoongArchState *env = cpu_env(cs);
-    uint64_t val;
-
-    if (0 <= n && n < 32) {
-        val = env->gpr[n];
-    } else if (n == 32) {
-        /* orig_a0 */
-        val = 0;
-    } else if (n == 33) {
-        val = env->pc;
-    } else if (n == 34) {
-        val = env->CSR_BADV;
-    }
 
     if (0 <= n && n <= 34) {
+        uint64_t val;
+
+        if (n < 32) {
+            val = env->gpr[n];
+        } else if (n == 32) {
+            /* orig_a0 */
+            val = 0;
+        } else if (n == 33) {
+            val = env->pc;
+        } else /* if (n == 34) */ {
+            val = env->CSR_BADV;
+        }
+
         if (is_la64(env)) {
             return gdb_get_reg64(mem_buf, val);
         } else {
             return gdb_get_reg32(mem_buf, val);
         }
     }
+
     return 0;
 }
 
-- 
2.45.2.827.g557ae147e6



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

* [PULL 17/22] tests: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (15 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 16/22] target/loongarch: " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 18/22] hw/virtio: fix -Werror=maybe-uninitialized marcandre.lureau
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Marc-André Lureau

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

../tests/unit/test-block-iothread.c:773:17: error: ‘job’ may be used uninitialized [-Werror=maybe-uninitialized]
/usr/include/glib-2.0/glib/gtestutils.h:73:53: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 tests/unit/test-bdrv-drain.c     | 2 +-
 tests/unit/test-block-iothread.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/unit/test-bdrv-drain.c b/tests/unit/test-bdrv-drain.c
index 666880472b..c112d5b189 100644
--- a/tests/unit/test-bdrv-drain.c
+++ b/tests/unit/test-bdrv-drain.c
@@ -722,7 +722,7 @@ static void test_blockjob_common_drain_node(enum drain_type drain_type,
     BlockJob *job;
     TestBlockJob *tjob;
     IOThread *iothread = NULL;
-    int ret;
+    int ret = -1;
 
     src = bdrv_new_open_driver(&bdrv_test, "source", BDRV_O_RDWR,
                                &error_abort);
diff --git a/tests/unit/test-block-iothread.c b/tests/unit/test-block-iothread.c
index 3766d5de6b..20ed54f570 100644
--- a/tests/unit/test-block-iothread.c
+++ b/tests/unit/test-block-iothread.c
@@ -745,7 +745,7 @@ static void test_propagate_mirror(void)
     AioContext *main_ctx = qemu_get_aio_context();
     BlockDriverState *src, *target, *filter;
     BlockBackend *blk;
-    Job *job;
+    Job *job = NULL;
     Error *local_err = NULL;
 
     /* Create src and target*/
-- 
2.45.2.827.g557ae147e6



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

* [PULL 18/22] hw/virtio: fix -Werror=maybe-uninitialized
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (16 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 17/22] tests: " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 19/22] hw/virtio: freeing leaked memory from vhost_svq_get_buf in vhost_svq_poll marcandre.lureau
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Michael S. Tsirkin,
	Stefano Garzarella, Eugenio Pérez

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

../hw/virtio/vhost-shadow-virtqueue.c:545:13: error: ‘r’ may be used uninitialized [-Werror=maybe-uninitialized]

Set `r` to 0 at every loop, since we don't check vhost_svq_get_buf()
return value.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
---
 hw/virtio/vhost-shadow-virtqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-virtqueue.c
index fc5f408f77..3b2beaea24 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw/virtio/vhost-shadow-virtqueue.c
@@ -526,10 +526,10 @@ static void vhost_svq_flush(VhostShadowVirtqueue *svq,
 size_t vhost_svq_poll(VhostShadowVirtqueue *svq, size_t num)
 {
     size_t len = 0;
-    uint32_t r;
 
     while (num--) {
         int64_t start_us = g_get_monotonic_time();
+        uint32_t r = 0;
 
         do {
             if (vhost_svq_more_used(svq)) {
-- 
2.45.2.827.g557ae147e6



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

* [PULL 19/22] hw/virtio: freeing leaked memory from vhost_svq_get_buf in vhost_svq_poll
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (17 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 18/22] hw/virtio: fix -Werror=maybe-uninitialized marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 20/22] block: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Eugenio Pérez,
	Michael S. Tsirkin, Stefano Garzarella

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

vhost_svq_get_buf() may return a VirtQueueElement that should be freed.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
---
 hw/virtio/vhost-shadow-virtqueue.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-virtqueue.c
index 3b2beaea24..37aca8b431 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw/virtio/vhost-shadow-virtqueue.c
@@ -414,6 +414,7 @@ static uint16_t vhost_svq_last_desc_of_chain(const VhostShadowVirtqueue *svq,
     return i;
 }
 
+G_GNUC_WARN_UNUSED_RESULT
 static VirtQueueElement *vhost_svq_get_buf(VhostShadowVirtqueue *svq,
                                            uint32_t *len)
 {
@@ -528,6 +529,7 @@ size_t vhost_svq_poll(VhostShadowVirtqueue *svq, size_t num)
     size_t len = 0;
 
     while (num--) {
+        g_autofree VirtQueueElement *elem = NULL;
         int64_t start_us = g_get_monotonic_time();
         uint32_t r = 0;
 
@@ -541,7 +543,7 @@ size_t vhost_svq_poll(VhostShadowVirtqueue *svq, size_t num)
             }
         } while (true);
 
-        vhost_svq_get_buf(svq, &r);
+        elem = vhost_svq_get_buf(svq, &r);
         len += r;
     }
 
-- 
2.45.2.827.g557ae147e6



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

* [PULL 20/22] block: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (18 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 19/22] hw/virtio: freeing leaked memory from vhost_svq_get_buf in vhost_svq_poll marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 21/22] fsdep/9p: " marcandre.lureau
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Kevin Wolf, Hanna Reitz,
	open list:raw

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

../block/file-posix.c:1405:17: error: ‘zoned’ may be used uninitialized [-Werror=maybe-uninitialized]
 1405 |     if (ret < 0 || zoned == BLK_Z_NONE) {

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 block/file-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/file-posix.c b/block/file-posix.c
index ff928b5e85..90fa54352c 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1398,7 +1398,7 @@ static void raw_refresh_zoned_limits(BlockDriverState *bs, struct stat *st,
                                      Error **errp)
 {
     BDRVRawState *s = bs->opaque;
-    BlockZoneModel zoned;
+    BlockZoneModel zoned = BLK_Z_NONE;
     int ret;
 
     ret = get_sysfs_zoned_model(st, &zoned);
-- 
2.45.2.827.g557ae147e6



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

* [PULL 21/22] fsdep/9p: fix -Werror=maybe-uninitialized false-positive
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (19 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 20/22] block: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:36 ` [PULL 22/22] qom/object: fix -Werror=maybe-uninitialized marcandre.lureau
  2024-10-02  8:42 ` [PULL 00/22] -Werror=maybe-uninitialized fixes Thomas Huth
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Greg Kurz,
	Christian Schoenebeck

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

../fsdev/9p-iov-marshal.c:93:23: error: ‘val’ may be used uninitialized [-Werror=maybe-uninitialized]
and similar

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
 fsdev/9p-iov-marshal.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/fsdev/9p-iov-marshal.c b/fsdev/9p-iov-marshal.c
index a1c9beddd2..0c5a1a0fa2 100644
--- a/fsdev/9p-iov-marshal.c
+++ b/fsdev/9p-iov-marshal.c
@@ -84,9 +84,12 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset,
             break;
         }
         case 'w': {
-            uint16_t val, *valp;
+            uint16_t val = 0, *valp;
             valp = va_arg(ap, uint16_t *);
             copied = v9fs_unpack(&val, out_sg, out_num, offset, sizeof(val));
+            if (copied <= 0) {
+                break;
+            }
             if (bswap) {
                 *valp = le16_to_cpu(val);
             } else {
@@ -95,9 +98,12 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset,
             break;
         }
         case 'd': {
-            uint32_t val, *valp;
+            uint32_t val = 0, *valp;
             valp = va_arg(ap, uint32_t *);
             copied = v9fs_unpack(&val, out_sg, out_num, offset, sizeof(val));
+            if (copied <= 0) {
+                break;
+            }
             if (bswap) {
                 *valp = le32_to_cpu(val);
             } else {
@@ -106,9 +112,12 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset,
             break;
         }
         case 'q': {
-            uint64_t val, *valp;
+            uint64_t val = 0, *valp;
             valp = va_arg(ap, uint64_t *);
             copied = v9fs_unpack(&val, out_sg, out_num, offset, sizeof(val));
+            if (copied <= 0) {
+                break;
+            }
             if (bswap) {
                 *valp = le64_to_cpu(val);
             } else {
-- 
2.45.2.827.g557ae147e6



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

* [PULL 22/22] qom/object: fix -Werror=maybe-uninitialized
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (20 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 21/22] fsdep/9p: " marcandre.lureau
@ 2024-10-02  8:36 ` marcandre.lureau
  2024-10-02  8:42 ` [PULL 00/22] -Werror=maybe-uninitialized fixes Thomas Huth
  22 siblings, 0 replies; 27+ messages in thread
From: marcandre.lureau @ 2024-10-02  8:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Marc-André Lureau, Paolo Bonzini,
	Daniel P. Berrangé, Eduardo Habkost

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

object_resolve_path_type() sets *ambiguousp only when it is.

Fixes: 81c48dd79655 (hw/i386/acpi: Add object_resolve_type_unambiguous to improve modularity)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 qom/object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qom/object.c b/qom/object.c
index 28c5b66eab..d3d3003541 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -2226,7 +2226,7 @@ Object *object_resolve_path_at(Object *parent, const char *path)
 
 Object *object_resolve_type_unambiguous(const char *typename, Error **errp)
 {
-    bool ambig;
+    bool ambig = false;
     Object *o = object_resolve_path_type("", typename, &ambig);
 
     if (ambig) {
-- 
2.45.2.827.g557ae147e6



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

* Re: [PULL 03/22] hw/qxl: fix -Werror=maybe-uninitialized false-positives
  2024-10-02  8:36 ` [PULL 03/22] hw/qxl: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
@ 2024-10-02  8:40   ` Thomas Huth
  0 siblings, 0 replies; 27+ messages in thread
From: Thomas Huth @ 2024-10-02  8:40 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel; +Cc: peter.maydell

On 02/10/2024 10.36, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> ../hw/display/qxl.c:1352:5: error: ‘pci_region’ may be used uninitialized [-Werror=maybe-uninitialized]
> ../hw/display/qxl.c:1365:22: error: ‘pci_start’ may be used uninitialized [-Werror=maybe-uninitialized]
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
...
> diff --git a/roms/openbios b/roms/openbios
> index c3a19c1e54..af97fd7af5 160000
> --- a/roms/openbios
> +++ b/roms/openbios
> @@ -1 +1 @@
> -Subproject commit c3a19c1e54977a53027d6232050e1e3e39a98a1b
> +Subproject commit af97fd7af5e7c18f591a7b987291d3db4ffb28b5

That looks like an unintentional change?

  Thomas



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

* Re: [PULL 00/22] -Werror=maybe-uninitialized fixes
  2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
                   ` (21 preceding siblings ...)
  2024-10-02  8:36 ` [PULL 22/22] qom/object: fix -Werror=maybe-uninitialized marcandre.lureau
@ 2024-10-02  8:42 ` Thomas Huth
  2024-10-02  8:45   ` Marc-André Lureau
  22 siblings, 1 reply; 27+ messages in thread
From: Thomas Huth @ 2024-10-02  8:42 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel; +Cc: peter.maydell

On 02/10/2024 10.36, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> The following changes since commit 718780d20470c66a3a36d036b29148d5809dc855:
> 
>    Merge tag 'pull-nvme-20241001' of https://gitlab.com/birkelund/qemu into staging (2024-10-01 11:34:07 +0100)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/marcandre.lureau/qemu.git tags/warn-pull-request
> 
> for you to fetch changes up to baad82ecfb27474f17f4318502725622ab7170fc:
> 
>    qom/object: fix -Werror=maybe-uninitialized (2024-10-02 11:36:12 +0400)
> 
> ----------------------------------------------------------------
> -Werror=maybe-uninitialized fixes
> 
> ----------------------------------------------------------------
> 
> 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
>    hw/virtio: freeing leaked memory from vhost_svq_get_buf in
>      vhost_svq_poll
>    block: fix -Werror=maybe-uninitialized false-positive
>    fsdep/9p: fix -Werror=maybe-uninitialized false-positive
>    qom/object: fix -Werror=maybe-uninitialized
> 
>   block/block-copy.c                 |  2 +-
>   block/file-posix.c                 |  2 +-
>   block/mirror.c                     |  8 ++++----
>   block/stream.c                     |  6 +++---
>   fsdev/9p-iov-marshal.c             | 15 ++++++++++++---
>   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         |  2 ++
>   migration/dirtyrate.c              |  4 ++--
>   migration/migration.c              |  2 +-
>   migration/ram.c                    |  2 +-
>   nbd/client-connection.c            |  2 +-
>   qom/object.c                       |  2 +-
>   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 +-

Replying here as well, so that Peter has a chance to see it:

The update to roms/openbios in patch 03 seems to have slipped in by 
accident, so I'd suggest to fix that first before merging this.

  Thomas



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

* Re: [PULL 00/22] -Werror=maybe-uninitialized fixes
  2024-10-02  8:42 ` [PULL 00/22] -Werror=maybe-uninitialized fixes Thomas Huth
@ 2024-10-02  8:45   ` Marc-André Lureau
  2024-10-02 12:11     ` Peter Maydell
  0 siblings, 1 reply; 27+ messages in thread
From: Marc-André Lureau @ 2024-10-02  8:45 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, peter.maydell

[-- Attachment #1: Type: text/plain, Size: 3913 bytes --]

Hi

On Wed, Oct 2, 2024 at 12:43 PM Thomas Huth <thuth@redhat.com> wrote:

> On 02/10/2024 10.36, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > The following changes since commit
> 718780d20470c66a3a36d036b29148d5809dc855:
> >
> >    Merge tag 'pull-nvme-20241001' of https://gitlab.com/birkelund/qemu
> into staging (2024-10-01 11:34:07 +0100)
> >
> > are available in the Git repository at:
> >
> >    https://gitlab.com/marcandre.lureau/qemu.git tags/warn-pull-request
> >
> > for you to fetch changes up to baad82ecfb27474f17f4318502725622ab7170fc:
> >
> >    qom/object: fix -Werror=maybe-uninitialized (2024-10-02 11:36:12
> +0400)
> >
> > ----------------------------------------------------------------
> > -Werror=maybe-uninitialized fixes
> >
> > ----------------------------------------------------------------
> >
> > 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
> >    hw/virtio: freeing leaked memory from vhost_svq_get_buf in
> >      vhost_svq_poll
> >    block: fix -Werror=maybe-uninitialized false-positive
> >    fsdep/9p: fix -Werror=maybe-uninitialized false-positive
> >    qom/object: fix -Werror=maybe-uninitialized
> >
> >   block/block-copy.c                 |  2 +-
> >   block/file-posix.c                 |  2 +-
> >   block/mirror.c                     |  8 ++++----
> >   block/stream.c                     |  6 +++---
> >   fsdev/9p-iov-marshal.c             | 15 ++++++++++++---
> >   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         |  2 ++
> >   migration/dirtyrate.c              |  4 ++--
> >   migration/migration.c              |  2 +-
> >   migration/ram.c                    |  2 +-
> >   nbd/client-connection.c            |  2 +-
> >   qom/object.c                       |  2 +-
> >   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 +-
>
> Replying here as well, so that Peter has a chance to see it:
>
> The update to roms/openbios in patch 03 seems to have slipped in by
> accident, so I'd suggest to fix that first before merging this.
>
>
\o/ submodules :)

Peter, do you want a v2?
thanks


-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 5338 bytes --]

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

* Re: [PULL 00/22] -Werror=maybe-uninitialized fixes
  2024-10-02  8:45   ` Marc-André Lureau
@ 2024-10-02 12:11     ` Peter Maydell
  0 siblings, 0 replies; 27+ messages in thread
From: Peter Maydell @ 2024-10-02 12:11 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: Thomas Huth, qemu-devel

On Wed, 2 Oct 2024 at 09:45, Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi
>
> On Wed, Oct 2, 2024 at 12:43 PM Thomas Huth <thuth@redhat.com> wrote:
>>
>> On 02/10/2024 10.36, marcandre.lureau@redhat.com wrote:
>> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >
>> > The following changes since commit 718780d20470c66a3a36d036b29148d5809dc855:
>> >
>> >    Merge tag 'pull-nvme-20241001' of https://gitlab.com/birkelund/qemu into staging (2024-10-01 11:34:07 +0100)
>> >
>> > are available in the Git repository at:
>> >
>> >    https://gitlab.com/marcandre.lureau/qemu.git tags/warn-pull-request
>> >
>> > for you to fetch changes up to baad82ecfb27474f17f4318502725622ab7170fc:
>> >
>> >    qom/object: fix -Werror=maybe-uninitialized (2024-10-02 11:36:12 +0400)
>> >
>> > ----------------------------------------------------------------
>> > -Werror=maybe-uninitialized fixes
>> >
>> > ----------------------------------------------------------------
>> >
>> > 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
>> >    hw/virtio: freeing leaked memory from vhost_svq_get_buf in
>> >      vhost_svq_poll
>> >    block: fix -Werror=maybe-uninitialized false-positive
>> >    fsdep/9p: fix -Werror=maybe-uninitialized false-positive
>> >    qom/object: fix -Werror=maybe-uninitialized
>> >
>> >   block/block-copy.c                 |  2 +-
>> >   block/file-posix.c                 |  2 +-
>> >   block/mirror.c                     |  8 ++++----
>> >   block/stream.c                     |  6 +++---
>> >   fsdev/9p-iov-marshal.c             | 15 ++++++++++++---
>> >   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         |  2 ++
>> >   migration/dirtyrate.c              |  4 ++--
>> >   migration/migration.c              |  2 +-
>> >   migration/ram.c                    |  2 +-
>> >   nbd/client-connection.c            |  2 +-
>> >   qom/object.c                       |  2 +-
>> >   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 +-
>>
>> Replying here as well, so that Peter has a chance to see it:
>>
>> The update to roms/openbios in patch 03 seems to have slipped in by
>> accident, so I'd suggest to fix that first before merging this.
>>
>
> \o/ submodules :)
>
> Peter, do you want a v2?
> thanks

Yes, you'll need to resend the pullreq. (You can send just
the cover letter for a trivial tweak like this.)

-- PMM


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

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

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02  8:36 [PULL 00/22] -Werror=maybe-uninitialized fixes marcandre.lureau
2024-10-02  8:36 ` [PULL 01/22] util/coroutine: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-10-02  8:36 ` [PULL 02/22] util/timer: " marcandre.lureau
2024-10-02  8:36 ` [PULL 03/22] hw/qxl: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
2024-10-02  8:40   ` Thomas Huth
2024-10-02  8:36 ` [PULL 04/22] nbd: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-10-02  8:36 ` [PULL 05/22] block/mirror: " marcandre.lureau
2024-10-02  8:36 ` [PULL 06/22] " marcandre.lureau
2024-10-02  8:36 ` [PULL 07/22] block/stream: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
2024-10-02  8:36 ` [PULL 08/22] hw/ahci: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-10-02  8:36 ` [PULL 09/22] hw/vhost-scsi: fix -Werror=maybe-uninitialized marcandre.lureau
2024-10-02  8:36 ` [PULL 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-10-02  8:36 ` [PULL 11/22] block/block-copy: " marcandre.lureau
2024-10-02  8:36 ` [PULL 12/22] migration: fix -Werror=maybe-uninitialized false-positives marcandre.lureau
2024-10-02  8:36 ` [PULL 13/22] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-10-02  8:36 ` [PULL 14/22] migration: " marcandre.lureau
2024-10-02  8:36 ` [PULL 15/22] linux-user/hppa: " marcandre.lureau
2024-10-02  8:36 ` [PULL 16/22] target/loongarch: " marcandre.lureau
2024-10-02  8:36 ` [PULL 17/22] tests: " marcandre.lureau
2024-10-02  8:36 ` [PULL 18/22] hw/virtio: fix -Werror=maybe-uninitialized marcandre.lureau
2024-10-02  8:36 ` [PULL 19/22] hw/virtio: freeing leaked memory from vhost_svq_get_buf in vhost_svq_poll marcandre.lureau
2024-10-02  8:36 ` [PULL 20/22] block: fix -Werror=maybe-uninitialized false-positive marcandre.lureau
2024-10-02  8:36 ` [PULL 21/22] fsdep/9p: " marcandre.lureau
2024-10-02  8:36 ` [PULL 22/22] qom/object: fix -Werror=maybe-uninitialized marcandre.lureau
2024-10-02  8:42 ` [PULL 00/22] -Werror=maybe-uninitialized fixes Thomas Huth
2024-10-02  8:45   ` Marc-André Lureau
2024-10-02 12:11     ` Peter Maydell

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).