This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 14/348] Fix -Wshadow warnings
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 19 Nov 2011 10:54:51 +0700
- Subject: [PATCH 14/348] Fix -Wshadow warnings
>From a436f0124f2c2f68ad0a7bcec8deaa3eec58c92d Mon Sep 17 00:00:00 2001
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Date: Sat, 19 Nov 2011 10:08:23 +0700
Subject: [PATCH 14/18] Fix Wshadow
---
gdb/ChangeLog | 4 ++++
gdb/ada-lang.c | 8 ++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 271261c..e04a177 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2011-11-19 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * ada-lang.c (remove_extra_symbols): Fix -Wshadow warnings.
+
+2011-11-19 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* ada-lang.c (ada_add_local_symbols): 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 cd7a534..12a5a65 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4488,7 +4488,7 @@ remove_extra_symbols (struct ada_symbol_info *syms, int nsyms)
i = 0;
while (i < nsyms)
{
- int remove = 0;
+ int remove_flag = 0;
/* If two symbols have the same name and one of them is a stub type,
the get rid of the stub. */
@@ -4503,7 +4503,7 @@ remove_extra_symbols (struct ada_symbol_info *syms, int nsyms)
&& SYMBOL_LINKAGE_NAME (syms[j].sym) != NULL
&& strcmp (SYMBOL_LINKAGE_NAME (syms[i].sym),
SYMBOL_LINKAGE_NAME (syms[j].sym)) == 0)
- remove = 1;
+ remove_flag = 1;
}
}
@@ -4523,11 +4523,11 @@ remove_extra_symbols (struct ada_symbol_info *syms, int nsyms)
&& SYMBOL_CLASS (syms[i].sym) == SYMBOL_CLASS (syms[j].sym)
&& SYMBOL_VALUE_ADDRESS (syms[i].sym)
== SYMBOL_VALUE_ADDRESS (syms[j].sym))
- remove = 1;
+ remove_flag = 1;
}
}
- if (remove)
+ if (remove_flag)
{
for (j = i + 1; j < nsyms; j += 1)
syms[j - 1] = syms[j];
--
1.7.5.4