[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/19] hw/virtio-blk: fix -Werror=maybe-uninitialized false-posit
From: |
marcandre . lureau |
Subject: |
[PATCH 13/19] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive |
Date: |
Thu, 28 Mar 2024 14:20:46 +0400 |
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>
---
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 92de315f17..ce660ff9fe 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -1195,7 +1195,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.44.0
- [PATCH 07/19] hw/ahci: fix -Werror=maybe-uninitialized false-positive, (continued)
- [PATCH 07/19] hw/ahci: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 08/19] hw/vhost-scsi: fix -Werror=maybe-uninitialized, marcandre . lureau, 2024/03/28
- [PATCH 09/19] hw/sdhci: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 10/19] hw/rdma: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 11/19] migration/block: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 12/19] migration: fix -Werror=maybe-uninitialized false-positives, marcandre . lureau, 2024/03/28
- [PATCH 13/19] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive,
marcandre . lureau <=
- [PATCH 14/19] plugins: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 15/19] migration: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 16/19] tests: fix -Werror=maybe-uninitialized, marcandre . lureau, 2024/03/28
- [PATCH 17/19] hw/nvme: fix -Werror=maybe-uninitialized, marcandre . lureau, 2024/03/28
- [PATCH 18/19] hw/virtio: fix -Werror=maybe-uninitialized, marcandre . lureau, 2024/03/28
- [PATCH 19/19] RFC: hw/virtio: a potential leak fix, marcandre . lureau, 2024/03/28
- Re: [PATCH 00/19] -Werror=maybe-uninitialized fixes, Eric Blake, 2024/03/28