fix -Wshadow warning inside ada-lang.c:assign_aggregate
authorJoel Brobecker <brobecker@gnat.com>
Wed, 23 Nov 2011 19:54:08 +0000 (19:54 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Wed, 23 Nov 2011 19:54:08 +0000 (19:54 +0000)
gdb/ChangeLog:

        From Andrey Smirnov <andrew.smirnov@gmail.com>:
        * ada-lang.c (assign_aggregate): Remove declaration of local
        variable `i' which is shadowing another variable with the same
        name declared in the outer scope.

gdb/ChangeLog
gdb/ada-lang.c

index 3bb6d51..ea8fb66 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-23  Andrey Smirnov  <andrew.smirnov@gmail.com>
+
+       * ada-lang.c (assign_aggregate): Remove declaration of local
+       variable `i' which is shadowing another variable with the same
+       name declared in the outer scope.
+
 2011-11-23  Joel Brobecker  <brobecker@adacore.com>
 
        * ada-lang.c (get_base_type): Renames base_type.  Adjust all
index 6676685..48073fb 100644 (file)
@@ -8665,8 +8665,6 @@ assign_aggregate (struct value *container,
   *pos += 3;
   if (noside != EVAL_NORMAL)
     {
-      int i;
-
       for (i = 0; i < n; i += 1)
        ada_evaluate_subexp (NULL, exp, pos, noside);
       return container;