This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 008/238] Fix Wshadow
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: gdb-patches at sourceware dot org
- Cc: brobecker at adacore dot com, Andrey Smirnov <andrew dot smirnov at gmail dot com>
- Date: Sun, 27 Nov 2011 19:52:39 +0700
- Subject: [PATCH 008/238] Fix Wshadow
Rewritten so it is `wild_match_p' instead of `wild_mode_flag'.
---
gdb/ChangeLog | 5 +++++
gdb/ada-lang.c | 16 ++++++++--------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7499e45..5ef7c28 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-11-19 Andrey Smirnov <andrew.smirnov@gmail.com>
+ * ada-lang.c (ada_make_symbol_completion_list): Rename
+ `wild_match' to `wild_match_p'(-Wshadow).
+
+2011-11-19 Andrey Smirnov <andrew.smirnov@gmail.com>
+
* ada-lang.c (ada_index_struct_field): 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 d73e314..64b7f56 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -5650,7 +5650,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
{
char *text;
int text_len;
- int wild_match;
+ int wild_match_p;
int encoded;
VEC(char_ptr) *completions = VEC_alloc (char_ptr, 128);
struct symbol *sym;
@@ -5666,7 +5666,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
text = xstrdup (text0);
make_cleanup (xfree, text);
text_len = strlen (text);
- wild_match = 0;
+ wild_match_p = 0;
encoded = 1;
}
else
@@ -5682,7 +5682,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
qualified entity name, and the match must not be done in wild
mode. Similarly, if the user wants to complete what looks like
an encoded name, the match must not be done in wild mode. */
- wild_match = (strchr (text0, '.') == NULL && !encoded);
+ wild_match_p = (strchr (text0, '.') == NULL && !encoded);
}
/* First, look at the partial symtab symbols. */
@@ -5694,7 +5694,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
data.text_len = text_len;
data.text0 = text0;
data.word = word;
- data.wild_match = wild_match;
+ data.wild_match = wild_match_p;
data.encoded = encoded;
expand_partial_symbol_names (ada_expand_partial_symbol_name, &data);
}
@@ -5708,7 +5708,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
{
QUIT;
symbol_completion_add (&completions, SYMBOL_LINKAGE_NAME (msymbol),
- text, text_len, text0, word, wild_match, encoded);
+ text, text_len, text0, word, wild_match_p, encoded);
}
/* Search upwards from currently selected frame (so that we can
@@ -5723,7 +5723,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
{
symbol_completion_add (&completions, SYMBOL_LINKAGE_NAME (sym),
text, text_len, text0, word,
- wild_match, encoded);
+ wild_match_p, encoded);
}
}
@@ -5738,7 +5738,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
{
symbol_completion_add (&completions, SYMBOL_LINKAGE_NAME (sym),
text, text_len, text0, word,
- wild_match, encoded);
+ wild_match_p, encoded);
}
}
@@ -5753,7 +5753,7 @@ ada_make_symbol_completion_list (char *text0, char *word)
{
symbol_completion_add (&completions, SYMBOL_LINKAGE_NAME (sym),
text, text_len, text0, word,
- wild_match, encoded);
+ wild_match_p, encoded);
}
}
--
1.7.5.4