diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-11-10 19:23:13 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2020-11-16 11:08:00 +0000 |
commit | 811c74fb657db0559274a710e50ef0096a1915a3 (patch) | |
tree | 38199017162953331dc91954ac6346378a9327e3 /.mailmap | |
parent | 4bdccdec70b27a474afd4711dddbbf5a56c2040a (diff) | |
download | qemu-811c74fb657db0559274a710e50ef0096a1915a3.zip qemu-811c74fb657db0559274a710e50ef0096a1915a3.tar.gz qemu-811c74fb657db0559274a710e50ef0096a1915a3.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>
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>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions