[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/19] hw/qxl: fix -Werror=maybe-uninitialized false-positives
From: |
marcandre . lureau |
Subject: |
[PATCH 03/19] hw/qxl: fix -Werror=maybe-uninitialized false-positives |
Date: |
Thu, 28 Mar 2024 14:20:36 +0400 |
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>
---
hw/display/qxl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 7178dec85d..cfea4e7af5 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 = -1;
pcibus_t pci_end;
MemoryRegion *mr;
intptr_t virt_start;
--
2.44.0
- [PATCH 00/19] -Werror=maybe-uninitialized fixes, marcandre . lureau, 2024/03/28
- [PATCH 01/19] util/coroutine: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 02/19] util/timer: with -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 03/19] hw/qxl: fix -Werror=maybe-uninitialized false-positives,
marcandre . lureau <=
- [PATCH 04/19] nbd: with -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 05/19] block/mirror: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/03/28
- [PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives, marcandre . lureau, 2024/03/28
- [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