]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
softmmu/memory: Clean up local variable shadowing
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 4 Sep 2023 16:12:33 +0000 (18:12 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 29 Sep 2023 08:07:16 +0000 (10:07 +0200)
Fix:

  softmmu/memory.c: In function ‘mtree_print_mr’:
  softmmu/memory.c:3236:27: warning: declaration of ‘ml’ shadows a previous local [-Wshadow=compatible-local]
   3236 |         MemoryRegionList *ml;
        |                           ^~
  softmmu/memory.c:3213:32: note: shadowed declaration is here
   3213 |     MemoryRegionList *new_ml, *ml, *next_ml;
        |                                ^~

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20230904161235.84651-22-philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
softmmu/memory.c

index c0383a163d6a479ec2e14a515cfae892c2ef9f34..234bd7b116118aac14fa7f728ccbf32a64760f90 100644 (file)
@@ -3245,7 +3245,6 @@ static void mtree_print_mr(const MemoryRegion *mr, unsigned int level,
     }
 
     if (mr->alias) {
-        MemoryRegionList *ml;
         bool found = false;
 
         /* check if the alias is already in the queue */