[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positi
From: |
marcandre . lureau |
Subject: |
[PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive |
Date: |
Tue, 24 Sep 2024 17:05:49 +0400 |
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]
Signed-off-by: Marc-André Lureau <marcandre.lureau@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..cd29cc795b 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw/virtio/vhost-shadow-virtqueue.c
@@ -526,7 +526,7 @@ static void vhost_svq_flush(VhostShadowVirtqueue *svq,
size_t vhost_svq_poll(VhostShadowVirtqueue *svq, size_t num)
{
size_t len = 0;
- uint32_t r;
+ uint32_t r = 0;
while (num--) {
int64_t start_us = g_get_monotonic_time();
--
2.45.2.827.g557ae147e6
- Re: [PATCH v2 09/22] hw/vhost-scsi: fix -Werror=maybe-uninitialized, (continued)
- [PATCH v2 08/22] hw/ahci: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
- [PATCH v2 10/22] hw/sdhci: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
- [PATCH v2 12/22] migration: fix -Werror=maybe-uninitialized false-positives, marcandre . lureau, 2024/09/24
- [PATCH v2 11/22] block/block-copy: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
- [PATCH v2 16/22] target/loongarch: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
- [PATCH v2 13/22] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
- [PATCH v2 15/22] linux-user/hppa: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
- [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive,
marcandre . lureau <=
- Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive, Eugenio Perez Martin, 2024/09/27
- Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive, Stefano Garzarella, 2024/09/30
[PATCH v2 19/22] block: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
[PATCH v2 14/22] migration: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
[PATCH v2 21/22] fsdep/9p: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
[PATCH v2 17/22] tests: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24