[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/56] hw/core/machine: Clean up local variable shadowing
From: |
Markus Armbruster |
Subject: |
[PULL 27/56] hw/core/machine: Clean up local variable shadowing |
Date: |
Fri, 29 Sep 2023 10:50:24 +0200 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Fix:
hw/core/machine.c: In function ‘machine_initfn’:
hw/core/machine.c:1081:17: warning: declaration of ‘obj’ shadows a parameter
[-Wshadow=compatible-local]
1081 | Object *obj = OBJECT(ms);
| ^~~
hw/core/machine.c:1065:36: note: shadowed declaration is here
1065 | static void machine_initfn(Object *obj)
| ~~~~~~~~^~~
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230904162824.85385-2-philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
hw/core/machine.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index cb38b8cf4c..a232ae0bcd 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -1082,8 +1082,6 @@ static void machine_initfn(Object *obj)
ms->maxram_size = mc->default_ram_size;
if (mc->nvdimm_supported) {
- Object *obj = OBJECT(ms);
-
ms->nvdimms_state = g_new0(NVDIMMState, 1);
object_property_add_bool(obj, "nvdimm",
machine_get_nvdimm, machine_set_nvdimm);
--
2.41.0
- [PULL 41/56] hw/arm/smmuv3.c: Avoid shadowing variable, (continued)
- [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, 2023/09/29
- [PULL 27/56] hw/core/machine: Clean up local variable shadowing,
Markus Armbruster <=
- [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
- [PULL 51/56] hw/riscv: opentitan: Fixup local variables shadowing, Markus Armbruster, 2023/09/29