aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-03-29 23:30:55 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-03-29 23:30:55 +0000
commitb1ed564ad05fb27a5aec2b2594ff22065afc6d42 (patch)
treec8bad52faa74bfc7869bfd76c031309e6ffa9ab6 /gdb/ada-lang.c
parentcb8e9b977ecf427fcd84127e05c11855cc2fd217 (diff)
downloadgdb-b1ed564ad05fb27a5aec2b2594ff22065afc6d42.zip
gdb-b1ed564ad05fb27a5aec2b2594ff22065afc6d42.tar.gz
gdb-b1ed564ad05fb27a5aec2b2594ff22065afc6d42.tar.bz2
Rename variables in ada-lang.c:ada_make_symbol_completion_list.
This renaming allows us to have variable names that are consistent with the names of the parameters in the functions where these variables are used. This also allows us to avoid a -Wshadow warning in the case of variable "wild_match", which is now renamed to "wild_match_p". gdb/ChangeLog: -Wshadow warning fix. * ada-lang.c (ada_make_symbol_completion_list): Rename parameters "wild_match" and "encoded" into "wild_match_p" and "encoded_p". Adjust code accordingly.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 4a6e847..031609d 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -5807,8 +5807,8 @@ ada_make_symbol_completion_list (char *text0, char *word)
{
char *text;
int text_len;
- int wild_match;
- int encoded;
+ int wild_match_p;
+ int encoded_p;
VEC(char_ptr) *completions = VEC_alloc (char_ptr, 128);
struct symbol *sym;
struct symtab *s;
@@ -5823,8 +5823,8 @@ ada_make_symbol_completion_list (char *text0, char *word)
text = xstrdup (text0);
make_cleanup (xfree, text);
text_len = strlen (text);
- wild_match = 0;
- encoded = 1;
+ wild_match_p = 0;
+ encoded_p = 1;
}
else
{
@@ -5834,12 +5834,12 @@ ada_make_symbol_completion_list (char *text0, char *word)
for (i = 0; i < text_len; i++)
text[i] = tolower (text[i]);
- encoded = (strstr (text0, "__") != NULL);
+ encoded_p = (strstr (text0, "__") != NULL);
/* If the name contains a ".", then the user is entering a fully
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_p);
}
/* First, look at the partial symtab symbols. */
@@ -5851,8 +5851,8 @@ 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.encoded = encoded;
+ data.wild_match = wild_match_p;
+ data.encoded = encoded_p;
expand_partial_symbol_names (ada_expand_partial_symbol_name, &data);
}
@@ -5865,7 +5865,8 @@ 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_p);
}
/* Search upwards from currently selected frame (so that we can
@@ -5880,7 +5881,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_p);
}
}
@@ -5895,7 +5896,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_p);
}
}
@@ -5910,7 +5911,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_p);
}
}