diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-11-07 20:40:45 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-11-12 09:19:40 -0500 |
commit | 727a06326c9ebf4ad8ed80eb533278bc60202804 (patch) | |
tree | bedfbb39937e80130f89f81ff26adbd362137800 /net/l2tpv3.c | |
parent | d88618f717f948d97ae6f4401b014e30d52c68ec (diff) | |
download | qemu-727a06326c9ebf4ad8ed80eb533278bc60202804.zip qemu-727a06326c9ebf4ad8ed80eb533278bc60202804.tar.gz qemu-727a06326c9ebf4ad8ed80eb533278bc60202804.tar.bz2 |
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: df4008c9c59 ("piix4: don't reserve hw resources when hotplug is off globally")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201107194045.438027-1-philmd@redhat.com>
Acked-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net/l2tpv3.c')
0 files changed, 0 insertions, 0 deletions