qemu-e2k/hw/i386
Philippe Mathieu-Daudé 811c74fb65 hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off
GCC 9.3.0 thinks that 'method' can be left uninitialized. This code
is already in the "if (bsel || pcihp_bridge_en)" block statement,
but it isn't smart enough to figure it out.

Restrict the code to be used only in the "if (bsel || pcihp_bridge_en)"
block statement to fix (on Ubuntu):

  ../hw/i386/acpi-build.c: In function 'build_append_pci_bus_devices':
  ../hw/i386/acpi-build.c:496:9: error: 'method' may be used uninitialized
  in this function [-Werror=maybe-uninitialized]
    496 |         aml_append(parent_scope, method);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Fixes: df4008c9c5 ("piix4: don't reserve hw resources when hotplug is off globally")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20201108204535.2319870-4-philmd@redhat.com>
Message-Id: <20201110192316.26397-8-alex.bennee@linaro.org>
2020-11-16 11:08:00 +00:00
..
kvm i386/kvm: Remove IRQ routing support checks 2020-10-14 15:28:54 -04:00
xen qapi: Restrict Xen migration commands to migration.json 2020-10-21 05:00:44 +02:00
acpi-build.c hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off 2020-11-16 11:08:00 +00:00
acpi-build.h
acpi-common.c apci: drop has_pci arg for acpi_build_madt 2020-10-21 11:36:05 +02:00
acpi-common.h apci: drop has_pci arg for acpi_build_madt 2020-10-21 11:36:05 +02:00
acpi-microvm.c microvm: add usb support 2020-10-21 11:36:19 +02:00
acpi-microvm.h microvm/acpi: add minimal acpi support 2020-09-17 14:16:19 +02:00
amd_iommu.c x86-iommu: Rename QOM type macros 2020-09-02 07:29:25 -04:00
amd_iommu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e820_memory_layout.c
e820_memory_layout.h
fw_cfg.c i386/kvm: Delete kvm_allows_irq0_override() 2020-10-14 15:28:54 -04:00
fw_cfg.h
generic_event_device_x86.c acpi: ged: add x86 device variant. 2020-09-17 14:16:19 +02:00
intel_iommu_internal.h
intel_iommu.c intel_iommu: Fix two misuse of "0x%u" prints 2020-10-30 06:48:53 -04:00
Kconfig microvm: add usb support 2020-10-21 11:36:19 +02:00
kvmvapic.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
meson.build microvm/acpi: add minimal acpi support 2020-09-17 14:16:19 +02:00
microvm.c microvm: add usb support 2020-10-21 11:36:19 +02:00
multiboot.c
multiboot.h
pc_piix.c pc: Implement -no-hpet as sugar for -machine hpet=on 2020-10-30 04:29:13 -04:00
pc_q35.c target/i386: always create kvmclock device 2020-09-30 19:11:36 +02:00
pc_sysfw.c
pc.c pc: comment style fixup 2020-11-03 07:19:26 -05:00
port92.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
trace-events
trace.h
vmmouse.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
vmport.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
x86-iommu-stub.c
x86-iommu.c x86-iommu: Rename QOM type macros 2020-09-02 07:29:25 -04:00
x86.c x86: make pci irqs runtime configurable 2020-10-21 11:36:05 +02:00