diff options
author | Cédric Le Goater <clg@kaod.org> | 2023-09-22 17:59:23 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-09-29 10:07:19 +0200 |
commit | e407513d285b96594a2710c9b37dff7ce9632f3e (patch) | |
tree | f988e48616888e3fe3161d6e092b46593d8f79f1 /hw/misc/aspeed_i3c.c | |
parent | e8874c06a7da70a59c7c7ac2cf0c3612cbc82f6d (diff) |
aspeed/i3c: Rename variable shadowing a local
to fix warning :
../hw/i3c/aspeed_i3c.c: In function ‘aspeed_i3c_realize’:
../hw/i3c/aspeed_i3c.c:1959:17: warning: declaration of ‘dev’ shadows a parameter [-Wshadow=local]
1959 | Object *dev = OBJECT(&s->devices[i]);
| ^~~
../hw/i3c/aspeed_i3c.c:1942:45: note: shadowed declaration is here
1942 | static void aspeed_i3c_realize(DeviceState *dev, Error **errp)
| ~~~~~~~~~~~~~^~~
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-ID: <20230922155924.1172019-4-clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/misc/aspeed_i3c.c')
-rw-r--r-- | hw/misc/aspeed_i3c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/misc/aspeed_i3c.c b/hw/misc/aspeed_i3c.c index f54f5da522..d1ff617671 100644 --- a/hw/misc/aspeed_i3c.c +++ b/hw/misc/aspeed_i3c.c @@ -296,13 +296,13 @@ static void aspeed_i3c_realize(DeviceState *dev, Error **errp) memory_region_add_subregion(&s->iomem_container, 0x0, &s->iomem); for (i = 0; i < ASPEED_I3C_NR_DEVICES; ++i) { - Object *dev = OBJECT(&s->devices[i]); + Object *i3c_dev = OBJECT(&s->devices[i]); - if (!object_property_set_uint(dev, "device-id", i, errp)) { + if (!object_property_set_uint(i3c_dev, "device-id", i, errp)) { return; } - if (!sysbus_realize(SYS_BUS_DEVICE(dev), errp)) { + if (!sysbus_realize(SYS_BUS_DEVICE(i3c_dev), errp)) { return; } |