This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 045/238] [index] dwarf2read.c: -Wshadow fix
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: gdb-patches at sourceware dot org
- Cc: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- Date: Mon, 12 Dec 2011 19:38:48 -0800
- Subject: [PATCH 045/238] [index] dwarf2read.c: -Wshadow fix
- References: <1323747545-29987-1-git-send-email-andrew.smirnov@gmail.com>
To ChangeLog:
* dwarf2read.c (dw2_expand_symtabs_matching): Rename `index' to
`mapped_ndx'(-Wshadow).
---
gdb/dwarf2read.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 25ebcfa..363a92d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2726,14 +2726,14 @@ dw2_expand_symtabs_matching (struct objfile *objfile,
{
int i;
offset_type iter;
- struct mapped_index *index;
+ struct mapped_index *mapped_ndx;
dw2_setup (objfile);
/* index_table is NULL if OBJF_READNOW. */
if (!dwarf2_per_objfile->index_table)
return;
- index = dwarf2_per_objfile->index_table;
+ mapped_ndx = dwarf2_per_objfile->index_table;
if (file_matcher != NULL)
for (i = 0; i < (dwarf2_per_objfile->n_comp_units
@@ -2761,24 +2761,24 @@ dw2_expand_symtabs_matching (struct objfile *objfile,
}
}
- for (iter = 0; iter < index->symbol_table_slots; ++iter)
+ for (iter = 0; iter < mapped_ndx->symbol_table_slots; ++iter)
{
offset_type idx = 2 * iter;
const char *name;
offset_type *vec, vec_len, vec_idx;
- if (index->symbol_table[idx] == 0 && index->symbol_table[idx + 1] == 0)
+ if (mapped_ndx->symbol_table[idx] == 0 && mapped_ndx->symbol_table[idx + 1] == 0)
continue;
- name = index->constant_pool + MAYBE_SWAP (index->symbol_table[idx]);
+ name = mapped_ndx->constant_pool + MAYBE_SWAP (mapped_ndx->symbol_table[idx]);
if (! (*name_matcher) (name, data))
continue;
/* The name was matched, now expand corresponding CUs that were
marked. */
- vec = (offset_type *) (index->constant_pool
- + MAYBE_SWAP (index->symbol_table[idx + 1]));
+ vec = (offset_type *) (mapped_ndx->constant_pool
+ + MAYBE_SWAP (mapped_ndx->symbol_table[idx + 1]));
vec_len = MAYBE_SWAP (vec[0]);
for (vec_idx = 0; vec_idx < vec_len; ++vec_idx)
{
--
1.7.5.4