This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 012/238] Fix Wshadow
`wild_match_p' instead of `wild_mode_flag'
---
gdb/ChangeLog | 5 +++++
gdb/ada-lang.c | 12 ++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8ad1845..550d16e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-11-19 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * ada-lang.c (ada_lookup_symbol_list): Rename `wild_match' to
+ `wild_match_p'(-Wshadow).
+
+2011-11-19 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* ada-lang.c (ada_lookup_encoded_symbol): 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 58fe767..7d2a55f 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4973,7 +4973,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
struct symbol *sym;
struct block *block;
const char *name;
- int wild_match;
+ int wild_match_p;
int cacheIfUnique;
int ndefns;
@@ -4984,7 +4984,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
/* Search specified block and its superiors. */
- wild_match = (strstr (name0, "__") == NULL);
+ wild_match_p = (strstr (name0, "__") == NULL);
name = name0;
block = (struct block *) block0; /* FIXME: No cast ought to be
needed, but adding const will
@@ -4999,7 +4999,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
entity inside its program). */
if (strncmp (name0, "standard__", sizeof ("standard__") - 1) == 0)
{
- wild_match = 0;
+ wild_match_p = 0;
block = NULL;
name = name0 + sizeof ("standard__") - 1;
}
@@ -5007,7 +5007,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
/* Check the non-global symbols. If we have ANY match, then we're done. */
ada_add_local_symbols (&symbol_list_obstack, name, block, namespace,
- wild_match);
+ wild_match_p);
if (num_defns_collected (&symbol_list_obstack) > 0)
goto done;
@@ -5026,14 +5026,14 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
/* Search symbols from all global blocks. */
add_nonlocal_symbols (&symbol_list_obstack, name, namespace, 1,
- wild_match);
+ wild_match_p);
/* Now add symbols from all per-file blocks if we've gotten no hits
(not strictly correct, but perhaps better than an error). */
if (num_defns_collected (&symbol_list_obstack) == 0)
add_nonlocal_symbols (&symbol_list_obstack, name, namespace, 0,
- wild_match);
+ wild_match_p);
done:
ndefns = num_defns_collected (&symbol_list_obstack);
--
1.7.5.4