This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 4/348] Fix -Wshadow warnings


>From fe8f6488024f9a92cae4e8c9dea1a8f81b8fb68a Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Sat, 19 Nov 2011 09:25:29 +0700
Subject: [PATCH 04/18] Fix Wshadow

---
 gdb/ChangeLog  |    6 ++++++
 gdb/ada-lang.c |   42 ++++++++++++++++++++----------------------
 2 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 58501e9..b074ad9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2011-11-19  Andrey Smirnov <andrew.smirnov@gmail.com>
 
+	* ada-lang.c (assign_aggregate): Fix -Wshadow warnings.
+	(assign_aggregate): Fix formatting and trailing
+	whitespaces(accidental).
+
+2011-11-19  Andrey Smirnov <andrew.smirnov@gmail.com>
+
 	* ada-lang.c (to_fixed_range_type): Fix -Wshadow warnings.
 
 2011-11-19  Andrey Smirnov <andrew.smirnov@gmail.com>
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index b7d1103..5afedf3 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -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;
@@ -8707,26 +8705,26 @@ assign_aggregate (struct value *container,
   for (i = 0; i < n; i += 1)
     {
       switch (exp->elts[*pos].opcode)
-	{
-	case OP_CHOICES:
-	  aggregate_assign_from_choices (container, lhs, exp, pos, indices, 
-					 &num_indices, max_indices,
-					 low_index, high_index);
-	  break;
-	case OP_POSITIONAL:
-	  aggregate_assign_positional (container, lhs, exp, pos, indices,
-				       &num_indices, max_indices,
-				       low_index, high_index);
-	  break;
-	case OP_OTHERS:
-	  if (i != n-1)
-	    error (_("Misplaced 'others' clause"));
-	  aggregate_assign_others (container, lhs, exp, pos, indices, 
-				   num_indices, low_index, high_index);
-	  break;
-	default:
-	  error (_("Internal error: bad aggregate clause"));
-	}
+        {
+        case OP_CHOICES:
+          aggregate_assign_from_choices (container, lhs, exp, pos, indices,
+                                         &num_indices, max_indices,
+                                         low_index, high_index);
+          break;
+        case OP_POSITIONAL:
+          aggregate_assign_positional (container, lhs, exp, pos, indices,
+                                       &num_indices, max_indices,
+                                       low_index, high_index);
+          break;
+        case OP_OTHERS:
+          if (i != n-1)
+            error (_("Misplaced 'others' clause"));
+          aggregate_assign_others (container, lhs, exp, pos, indices,
+                                   num_indices, low_index, high_index);
+          break;
+        default:
+          error (_("Internal error: bad aggregate clause"));
+        }
     }
 
   return container;
-- 
1.7.5.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]