aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
authorAni Sinha <anisinha@redhat.com>2023-10-03 15:58:02 +0530
committerMarkus Armbruster <armbru@redhat.com>2023-10-06 10:56:54 +0200
commit363636787d49a46840d415c2dbc925d287ed0206 (patch)
tree5c097b069c9d9a4504594eca72fe468d5085eb13 /hw/i386/pc.c
parent668a63140a42cd61c79a956a6222ce25cc893f69 (diff)
downloadqemu-363636787d49a46840d415c2dbc925d287ed0206.zip
qemu-363636787d49a46840d415c2dbc925d287ed0206.tar.gz
qemu-363636787d49a46840d415c2dbc925d287ed0206.tar.bz2
hw/i386: changes towards enabling -Wshadow=local for x86 machines
Code changes that addresses all compiler complaints coming from enabling -Wshadow flags. Enabling -Wshadow catches cases of local variables shadowing other local variables or parameters. These makes the code confusing and/or adds bugs that are difficult to catch. See also Subject: Help wanted for enabling -Wshadow=local Message-Id: <87r0mqlf9x.fsf@pond.sub.org> https://lore.kernel.org/qemu-devel/87r0mqlf9x.fsf@pond.sub.org CC: Markus Armbruster <armbru@redhat.com> CC: Philippe Mathieu-Daude <philmd@linaro.org> CC: mst@redhat.com Signed-off-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Message-ID: <20231003102803.6163-1-anisinha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r--hw/i386/pc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index aad7e8c..bb3854d 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1049,7 +1049,6 @@ void pc_memory_init(PCMachineState *pcms,
if (machine->device_memory) {
uint64_t *val = g_malloc(sizeof(*val));
- PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
uint64_t res_mem_end = machine->device_memory->base;
if (!pcmc->broken_reserved_end) {