[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/56] sysemu/device_tree: Clean up local variable shadowing
From: |
Markus Armbruster |
Subject: |
[PULL 24/56] sysemu/device_tree: Clean up local variable shadowing |
Date: |
Fri, 29 Sep 2023 10:50:21 +0200 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Fix:
hw/mips/boston.c:472:5: error: declaration shadows a local variable
[-Werror,-Wshadow]
qemu_fdt_setprop_cells(fdt, name, "reg", reg_base, reg_size);
^
include/sysemu/device_tree.h:129:13: note: expanded from macro
'qemu_fdt_setprop_cells'
int i;
^
hw/mips/boston.c:461:9: note: previous declaration is here
int i;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230904161235.84651-21-philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
include/sysemu/device_tree.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/sysemu/device_tree.h b/include/sysemu/device_tree.h
index ca5339beae..8eab395934 100644
--- a/include/sysemu/device_tree.h
+++ b/include/sysemu/device_tree.h
@@ -126,10 +126,8 @@ int qemu_fdt_add_path(void *fdt, const char *path);
#define qemu_fdt_setprop_cells(fdt, node_path, property, ...) \
do { \
uint32_t qdt_tmp[] = { __VA_ARGS__ }; \
- int i; \
- \
- for (i = 0; i < ARRAY_SIZE(qdt_tmp); i++) { \
- qdt_tmp[i] = cpu_to_be32(qdt_tmp[i]); \
+ for (unsigned i_ = 0; i_ < ARRAY_SIZE(qdt_tmp); i_++) { \
+ qdt_tmp[i_] = cpu_to_be32(qdt_tmp[i_]); \
} \
qemu_fdt_setprop(fdt, node_path, property, qdt_tmp, \
sizeof(qdt_tmp)); \
--
2.41.0
- [PULL 26/56] softmmu/physmem: Clean up local variable shadowing, (continued)
- [PULL 26/56] softmmu/physmem: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 41/56] hw/arm/smmuv3.c: Avoid shadowing variable, Markus Armbruster, 2023/09/29
- [PULL 21/56] crypto/cipher-gnutls.c: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 29/56] hw/ppc: Clean up local variable shadowing in _FDT helper routine, Markus Armbruster, 2023/09/29
- [PULL 16/56] hw/arm/allwinner: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 20/56] net/eth: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 10/56] target/arm/hvf: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 39/56] hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd(), Markus Armbruster, 2023/09/29
- [PULL 33/56] spapr: Clean up local variable shadowing in spapr_get_fw_dev_path(), Markus Armbruster, 2023/09/29
- [PULL 36/56] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), Markus Armbruster, 2023/09/29
- [PULL 24/56] sysemu/device_tree: Clean up local variable shadowing,
Markus Armbruster <=
- [PULL 27/56] hw/core/machine: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 44/56] aspeed: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 43/56] aspeed/i2c: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 35/56] spapr/pci: Clean up local variable shadowing in spapr_phb_realize(), Markus Armbruster, 2023/09/29
- [PULL 37/56] test-throttle: don't shadow 'index' variable in do_test_accounting(), Markus Armbruster, 2023/09/29
- [PULL 46/56] aspeed/timer: Clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 56/56] disas/m68k: clean up local variable shadowing, Markus Armbruster, 2023/09/29
- [PULL 55/56] hw/nvme: Clean up local variable shadowing in nvme_ns_init(), Markus Armbruster, 2023/09/29
- [PULL 50/56] qemu-nbd: changes towards enabling -Wshadow=local, Markus Armbruster, 2023/09/29
- [PULL 54/56] softmmu/device_tree: Fixup local variables shadowing, Markus Armbruster, 2023/09/29