qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	"Joel Stanley" <joel@jms.id.au>
Subject: [PATCH 07/11] hw/arm/aspeed: Clean up local variable shadowing
Date: Fri,  1 Sep 2023 00:56:02 +0200	[thread overview]
Message-ID: <20230831225607.30829-8-philmd@linaro.org> (raw)
In-Reply-To: <20230831225607.30829-1-philmd@linaro.org>

Fix:

  hw/arm/aspeed_ast2600.c:391:18: error: declaration shadows a local variable [-Werror,-Wshadow]
        qemu_irq irq = aspeed_soc_get_irq(s, ASPEED_DEV_TIMER1 + i);
                 ^
  hw/arm/aspeed_ast2600.c:283:14: note: previous declaration is here
    qemu_irq irq;
             ^
  hw/arm/aspeed_ast2600.c:416:18: error: declaration shadows a local variable [-Werror,-Wshadow]
        qemu_irq irq = qdev_get_gpio_in(DEVICE(&s->a7mpcore),
                 ^
  hw/arm/aspeed_ast2600.c:283:14: note: previous declaration is here
    qemu_irq irq;
             ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/arm/aspeed_ast2600.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index a8b3a8065a..f54063445d 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -280,7 +280,6 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
     AspeedSoCState *s = ASPEED_SOC(dev);
     AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
     Error *err = NULL;
-    qemu_irq irq;
     g_autofree char *sram_name = NULL;
 
     /* Default boot region (SPI memory or ROMs) */
@@ -339,6 +338,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
     for (i = 0; i < sc->num_cpus; i++) {
         SysBusDevice *sbd = SYS_BUS_DEVICE(&s->a7mpcore);
         DeviceState  *d   = DEVICE(&s->cpu[i]);
+        qemu_irq irq;
 
         irq = qdev_get_gpio_in(d, ARM_CPU_IRQ);
         sysbus_connect_irq(sbd, i, irq);
-- 
2.41.0



  parent reply	other threads:[~2023-08-31 22:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 22:55 [PATCH 00/11] (few more) Steps towards enabling -Wshadow Philippe Mathieu-Daudé
2023-08-31 22:55 ` [PATCH 01/11] tcg: Clean up local variable shadowing Philippe Mathieu-Daudé
2023-09-01  0:38   ` Richard Henderson
2023-09-04 12:52     ` Philippe Mathieu-Daudé
2023-08-31 22:55 ` [PATCH 02/11] target/arm: " Philippe Mathieu-Daudé
2023-09-01 10:46   ` Peter Maydell
2023-09-04 14:06     ` Philippe Mathieu-Daudé
2023-08-31 22:55 ` [PATCH 03/11] target/mips: " Philippe Mathieu-Daudé
2023-08-31 22:55 ` [PATCH 04/11] target/m68k: " Philippe Mathieu-Daudé
2023-09-01 11:31   ` Peter Maydell
2023-08-31 22:56 ` [PATCH 05/11] hw/arm/virt: " Philippe Mathieu-Daudé
2023-09-01 11:28   ` Peter Maydell
2023-08-31 22:56 ` [PATCH 06/11] hw/arm/allwinner: " Philippe Mathieu-Daudé
2023-09-01 11:29   ` Peter Maydell
2023-08-31 22:56 ` Philippe Mathieu-Daudé [this message]
2023-09-01  5:47   ` [PATCH 07/11] hw/arm/aspeed: " Cédric Le Goater
2023-08-31 22:56 ` [PATCH 08/11] hw/m68k: " Philippe Mathieu-Daudé
2023-08-31 22:56 ` [PATCH 09/11] hw/ide/ahci: " Philippe Mathieu-Daudé
2023-08-31 22:56 ` [PATCH 10/11] net/eth: " Philippe Mathieu-Daudé
2023-09-01  7:07   ` Akihiko Odaki
2023-09-04 12:57     ` Philippe Mathieu-Daudé
2023-08-31 22:56 ` [PATCH 11/11] sysemu/device_tree: " Philippe Mathieu-Daudé
2023-09-01  8:04 ` [PATCH 00/11] (few more) Steps towards enabling -Wshadow Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230831225607.30829-8-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=andrew@aj.id.au \
    --cc=armbru@redhat.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=joel@jms.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).