Re: [RFC PATCH-for-5.2] hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off

2020-11-07 Thread Michael S. Tsirkin
On Sat, Nov 07, 2020 at 11:29:40AM +0100, Philippe Mathieu-Daudé wrote: > 'method' can be left uninitialized. Restrict some code to be used > only in the "if (bsel || pcihp_bridge_en)" block statement. > > This fixes (gcc 9.3.0 on Ubuntu): > > ../hw/i386/acpi-build.c: In function 'build_append

[RFC PATCH-for-5.2] hw/i386/acpi-build: Fix maybe-uninitialized error when ACPI hotplug off

2020-11-07 Thread Philippe Mathieu-Daudé
'method' can be left uninitialized. Restrict some code to be used only in the "if (bsel || pcihp_bridge_en)" block statement. This fixes (gcc 9.3.0 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 unini