]> git.proxmox.com Git - mirror_qemu.git/commit
aspeed: Clean up local variable shadowing
authorCédric Le Goater <clg@kaod.org>
Fri, 22 Sep 2023 15:59:22 +0000 (17:59 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 29 Sep 2023 08:07:19 +0000 (10:07 +0200)
commite8874c06a7da70a59c7c7ac2cf0c3612cbc82f6d
tree978c61ee8f8c21884152d8c037365bf0e29ce8c6
parentce6c368d96ed88c2c8505c825b771e8632e84a88
aspeed: Clean up local variable shadowing

Remove superfluous local 'irq' variables and use the one define at the
top of the routine. This fixes warnings in aspeed_soc_ast2600_realize()
such as :

  ../hw/arm/aspeed_ast2600.c: In function ‘aspeed_soc_ast2600_realize’:
  ../hw/arm/aspeed_ast2600.c:420:18: warning: declaration of ‘irq’ shadows a previous local [-Wshadow=compatible-local]
    420 |         qemu_irq irq = aspeed_soc_get_irq(s, ASPEED_DEV_TIMER1 + i);
        |                  ^~~
  ../hw/arm/aspeed_ast2600.c:312:14: note: shadowed declaration is here
    312 |     qemu_irq irq;
        |              ^~~

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-ID: <20230922155924.1172019-3-clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
hw/arm/aspeed_ast2600.c