[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 08/22] hw/arm/virt: Clean up local variable shadowing
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 08/22] hw/arm/virt: Clean up local variable shadowing |
Date: |
Mon, 4 Sep 2023 18:12:20 +0200 |
Fix:
hw/arm/virt.c:821:22: error: declaration shadows a local variable
[-Werror,-Wshadow]
qemu_irq irq = qdev_get_gpio_in(vms->gic,
^
hw/arm/virt.c:803:13: note: previous declaration is here
int irq;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/virt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index a13c658bbf..32a964b572 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -800,7 +800,6 @@ static void create_gic(VirtMachineState *vms, MemoryRegion
*mem)
for (i = 0; i < smp_cpus; i++) {
DeviceState *cpudev = DEVICE(qemu_get_cpu(i));
int ppibase = NUM_IRQS + i * GIC_INTERNAL + GIC_NR_SGIS;
- int irq;
/* Mapping from the output timer irq lines from the CPU to the
* GIC PPI inputs we use for the virt board.
*/
@@ -811,7 +810,7 @@ static void create_gic(VirtMachineState *vms, MemoryRegion
*mem)
[GTIMER_SEC] = ARCH_TIMER_S_EL1_IRQ,
};
- for (irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) {
+ for (unsigned irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) {
qdev_connect_gpio_out(cpudev, irq,
qdev_get_gpio_in(vms->gic,
ppibase + timer_irq[irq]));
--
2.41.0
- [PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing, (continued)
- [PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 03/22] target/arm/hvf: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 04/22] target/mips: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 05/22] target/m68k: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 06/22] target/tricore: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 07/22] hw/arm/armv7m: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 08/22] hw/arm/virt: Clean up local variable shadowing,
Philippe Mathieu-Daudé <=
- [PATCH v2 09/22] hw/arm/allwinner: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 10/22] hw/arm/aspeed: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 11/22] hw/ide/ahci: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 12/22] hw/m68k: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 13/22] hw/microblaze: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 14/22] hw/nios2: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04
- [PATCH v2 15/22] net/eth: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/09/04