[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/31] softmmu/physmem: Silence GCC 10 maybe-uninitialized error
From: |
Paolo Bonzini |
Subject: |
[PULL 06/31] softmmu/physmem: Silence GCC 10 maybe-uninitialized error |
Date: |
Sat, 23 Jan 2021 09:31:03 -0500 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
When building with GCC 10.2 configured with --extra-cflags=-Os, we get:
softmmu/physmem.c: In function 'address_space_translate_for_iotlb':
softmmu/physmem.c:643:26: error: 'notifier' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
643 | notifier->active = true;
| ^
softmmu/physmem.c:608:23: note: 'notifier' was declared here
608 | TCGIOMMUNotifier *notifier;
| ^~~~~~~~
Initialize 'notifier' to silence the warning.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210117170411.4106949-1-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
softmmu/physmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 6301f4f0a5..cdcd197656 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -605,7 +605,7 @@ static void tcg_register_iommu_notifier(CPUState *cpu,
* when the IOMMU tells us the mappings we've cached have changed.
*/
MemoryRegion *mr = MEMORY_REGION(iommu_mr);
- TCGIOMMUNotifier *notifier;
+ TCGIOMMUNotifier *notifier = NULL;
int i;
for (i = 0; i < cpu->iommu_notifiers->len; i++) {
--
2.26.2
- [PULL 01/31] runstate: cleanup reboot and panic actions, (continued)
- [PULL 01/31] runstate: cleanup reboot and panic actions, Paolo Bonzini, 2021/01/23
- [PULL 02/31] configure: MinGW respect --bindir argument, Paolo Bonzini, 2021/01/23
- [PULL 08/31] build-sys: remove unused LIBS, Paolo Bonzini, 2021/01/23
- [PULL 13/31] nsis: adjust for new MinGW paths, Paolo Bonzini, 2021/01/23
- [PULL 05/31] util/cacheflush: Fix error generated by clang, Paolo Bonzini, 2021/01/23
- [PULL 14/31] meson: convert wixl detection to Meson, Paolo Bonzini, 2021/01/23
- [PULL 03/31] x86/cpu: Use max host physical address if -cpu max option is applied, Paolo Bonzini, 2021/01/23
- [PULL 07/31] ide: atapi: check logical block address and read size (CVE-2020-29443), Paolo Bonzini, 2021/01/23
- [PULL 10/31] build-sys: add libvhost-user missing dependencies, Paolo Bonzini, 2021/01/23
- [PULL 04/31] build-system: clean up TCG/TCI configury, Paolo Bonzini, 2021/01/23
- [PULL 06/31] softmmu/physmem: Silence GCC 10 maybe-uninitialized error,
Paolo Bonzini <=
- [PULL 12/31] meson: Declare have_virtfs_proxy_helper in main meson.build, Paolo Bonzini, 2021/01/23
- [PULL 15/31] meson: Summarize information related to directories first, Paolo Bonzini, 2021/01/23
- [PULL 16/31] meson: Display host binaries information altogether, Paolo Bonzini, 2021/01/23
- [PULL 17/31] meson: Summarize overall features altogether, Paolo Bonzini, 2021/01/23
- [PULL 19/31] meson: Display accelerators and selected targets altogether, Paolo Bonzini, 2021/01/23
- [PULL 09/31] build-sys: set global arguments for cflags/ldflags, Paolo Bonzini, 2021/01/23
- [PULL 18/31] meson: Summarize compilation-related information altogether, Paolo Bonzini, 2021/01/23
- [PULL 24/31] meson.build: Detect bzip2 program, Paolo Bonzini, 2021/01/23
- [PULL 22/31] meson: Add a section header for library dependencies, Paolo Bonzini, 2021/01/23
- [PULL 25/31] acceptance: switch to QMP change-vnc-password command, Paolo Bonzini, 2021/01/23