aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorSong Gao <gaosong@loongson.cn>2023-09-26 15:12:53 +0800
committerMarkus Armbruster <armbru@redhat.com>2023-10-06 10:56:54 +0200
commit78bcc3cc7b16d9ca118e1f860751930cbb64e81c (patch)
treeab2166b578cb9ac2238fa8be6a0378197f419b88 /hw
parenta97bcfea7e1e275d17bff06b7d2544d7ecbeb489 (diff)
downloadqemu-78bcc3cc7b16d9ca118e1f860751930cbb64e81c.zip
qemu-78bcc3cc7b16d9ca118e1f860751930cbb64e81c.tar.gz
qemu-78bcc3cc7b16d9ca118e1f860751930cbb64e81c.tar.bz2
target/loongarch: Clean up local variable shadowing
Fix: [1839/2601] Compiling C object libqemu-loongarch64-softmmu.fa.p/hw_loongarch_virt.c.o ../hw/loongarch/virt.c: In function 'loongarch_irq_init': ../hw/loongarch/virt.c:665:14: warning: declaration of 'i' shadows a previous local [-Wshadow=compatible-local] for (int i = 0; i < num; i++) { ^ ../hw/loongarch/virt.c:582:19: note: shadowed declaration is here int cpu, pin, i, start, num; Signed-off-by: Song Gao <gaosong@loongson.cn> Message-ID: <20230926071253.3601021-1-gaosong@loongson.cn> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/loongarch/virt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 2629128..b0a004f 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -662,7 +662,7 @@ static void loongarch_irq_init(LoongArchMachineState *lams)
sysbus_mmio_get_region(d, 2));
/* Connect pch_pic irqs to extioi */
- for (int i = 0; i < num; i++) {
+ for (i = 0; i < num; i++) {
qdev_connect_gpio_out(DEVICE(d), i, qdev_get_gpio_in(extioi, i));
}