[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 20/24] acpi: avoid potential uninitialized access to
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 20/24] acpi: avoid potential uninitialized access to cpu_hp_io_base |
Date: |
Thu, 13 Aug 2015 15:15:39 +0300 |
From: "Daniel P. Berrange" <address@hidden>
When building QEMU with Mingw64 toolchain I see a warning
CC x86_64-softmmu/hw/i386/acpi-build.o
hw/i386/acpi-build.c: In function 'acpi_build':
hw/i386/acpi-build.c:1138:9: warning: 'pm.cpu_hp_io_base' may be used
uninitialized in this function [-Wmaybe-uninitialized]
aml_append(crs,
^
hw/i386/acpi-build.c:1666:16: note: 'pm.cpu_hp_io_base' was declared here
AcpiPmInfo pm;
^
In acpi_get_pm_info() some of the fields are pre-initialized
to 0, but this one was missed.
Signed-off-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
---
hw/i386/acpi-build.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 46eddb8..95e0c65 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -169,6 +169,7 @@ static void acpi_get_pm_info(AcpiPmInfo *pm)
Object *obj = NULL;
QObject *o;
+ pm->cpu_hp_io_base = 0;
pm->pcihp_io_base = 0;
pm->pcihp_io_len = 0;
if (piix) {
--
MST
- [Qemu-devel] [PULL 10/24] pc: Eliminate pc_default_machine_options(), (continued)
- [Qemu-devel] [PULL 10/24] pc: Eliminate pc_default_machine_options(), Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 12/24] pc: Use PCMachineState for pc_memory_init() argument, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 11/24] pc: Use PCMachineState for pc_cmos_init() argument, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 14/24] pc: Use PCMachineState as pc_guest_info_init() argument, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 13/24] pc: Move {above, below}_4g_mem_size variables to PCMachineState, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 15/24] pc: Remove redundant arguments from *load_linux(), Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 17/24] pc: Remove redundant arguments from pc_memory_init(), Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 16/24] pc: Remove redundant arguments from pc_cmos_init(), Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 18/24] pci: allow 0 address for PCI IO/MEM regions, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 19/24] virtio-net: remove useless codes, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 20/24] acpi: avoid potential uninitialized access to cpu_hp_io_base,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 21/24] smbios: extract x86 smbios building code into a function, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 22/24] smbios: remove dependency on x86 e820 tables, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 23/24] smbios: move smbios code into a common folder, Michael S. Tsirkin, 2015/08/13
- [Qemu-devel] [PULL 24/24] MAINTAINERS: list smbios maintainers, Michael S. Tsirkin, 2015/08/13
- Re: [Qemu-devel] [PULL 00/24] virtio,pc,acpi fixes, cleanups, Peter Maydell, 2015/08/13