Skip to content

Commit

Permalink
hw/core/machine: Clean up local variable shadowing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd authored and Markus Armbruster committed Sep 29, 2023
1 parent 6ba9b60 commit 5e0528a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions hw/core/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5e0528a

Please sign in to comment.