rename "symbol_info" to "sym_info" in ada-lang.c...
... to avoid a -Wshadow warning with a symbol exported by BFD. gdb/ChangeLog: -Wshadow warning fix. * ada-lang.c (ada_lookup_encoded_symbol): Rename parameter "symbol_info" into "info". Adjust code accordingly. (ada_lookup_symbol): Likewise.
This commit is contained in:
parent
9f88c95977
commit
5e2336be92
2 changed files with 18 additions and 10 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2012-03-29 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
Andrey Smirnov <andrew.smirnov@gmail.com>
|
||||||
|
|
||||||
|
-Wshadow warning fix.
|
||||||
|
* ada-lang.c (ada_lookup_encoded_symbol): Rename parameter
|
||||||
|
"symbol_info" into "info". Adjust code accordingly.
|
||||||
|
(ada_lookup_symbol): Likewise.
|
||||||
|
|
||||||
2012-03-29 Joel Brobecker <brobecker@adacore.com>
|
2012-03-29 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* ada-lang.c (ada_lookup_symbol_list): Minor reformatting
|
* ada-lang.c (ada_lookup_symbol_list): Minor reformatting
|
||||||
|
|
|
@ -5198,19 +5198,19 @@ ada_iterate_over_symbols (const struct block *block,
|
||||||
to 1, but choosing the first symbol found if there are multiple
|
to 1, but choosing the first symbol found if there are multiple
|
||||||
choices.
|
choices.
|
||||||
|
|
||||||
The result is stored in *SYMBOL_INFO, which must be non-NULL.
|
The result is stored in *INFO, which must be non-NULL.
|
||||||
If no match is found, SYMBOL_INFO->SYM is set to NULL. */
|
If no match is found, INFO->SYM is set to NULL. */
|
||||||
|
|
||||||
void
|
void
|
||||||
ada_lookup_encoded_symbol (const char *name, const struct block *block,
|
ada_lookup_encoded_symbol (const char *name, const struct block *block,
|
||||||
domain_enum namespace,
|
domain_enum namespace,
|
||||||
struct ada_symbol_info *symbol_info)
|
struct ada_symbol_info *info)
|
||||||
{
|
{
|
||||||
struct ada_symbol_info *candidates;
|
struct ada_symbol_info *candidates;
|
||||||
int n_candidates;
|
int n_candidates;
|
||||||
|
|
||||||
gdb_assert (symbol_info != NULL);
|
gdb_assert (info != NULL);
|
||||||
memset (symbol_info, 0, sizeof (struct ada_symbol_info));
|
memset (info, 0, sizeof (struct ada_symbol_info));
|
||||||
|
|
||||||
n_candidates = ada_lookup_symbol_list (name, block, namespace, &candidates,
|
n_candidates = ada_lookup_symbol_list (name, block, namespace, &candidates,
|
||||||
1);
|
1);
|
||||||
|
@ -5218,8 +5218,8 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block,
|
||||||
if (n_candidates == 0)
|
if (n_candidates == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
*symbol_info = candidates[0];
|
*info = candidates[0];
|
||||||
symbol_info->sym = fixup_symbol_section (symbol_info->sym, NULL);
|
info->sym = fixup_symbol_section (info->sym, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a symbol in DOMAIN matching NAME, in BLOCK0 and enclosing
|
/* Return a symbol in DOMAIN matching NAME, in BLOCK0 and enclosing
|
||||||
|
@ -5232,14 +5232,14 @@ struct symbol *
|
||||||
ada_lookup_symbol (const char *name, const struct block *block0,
|
ada_lookup_symbol (const char *name, const struct block *block0,
|
||||||
domain_enum namespace, int *is_a_field_of_this)
|
domain_enum namespace, int *is_a_field_of_this)
|
||||||
{
|
{
|
||||||
struct ada_symbol_info symbol_info;
|
struct ada_symbol_info info;
|
||||||
|
|
||||||
if (is_a_field_of_this != NULL)
|
if (is_a_field_of_this != NULL)
|
||||||
*is_a_field_of_this = 0;
|
*is_a_field_of_this = 0;
|
||||||
|
|
||||||
ada_lookup_encoded_symbol (ada_encode (ada_fold_name (name)),
|
ada_lookup_encoded_symbol (ada_encode (ada_fold_name (name)),
|
||||||
block0, namespace, &symbol_info);
|
block0, namespace, &info);
|
||||||
return symbol_info.sym;
|
return info.sym;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct symbol *
|
static struct symbol *
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue