aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-12-11 13:42:17 +0000
committerNick Clifton <nickc@redhat.com>2009-12-11 13:42:17 +0000
commit91d6fa6a035cc7d0b7be5c99c194a64cb80924b0 (patch)
tree214507c313b77d619b52afcae2af0b02c9fa700b /bfd/archive.c
parent01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff)
downloadgdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.zip
gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.tar.gz
gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.tar.bz2
Add -Wshadow to the gcc command line options used when compiling the binutils.
Fix up all warnings generated by the addition of this switch.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 36252d5..4d67463 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -354,15 +354,15 @@ _bfd_find_nested_archive (bfd *arch_bfd, const char *filename)
static char *
get_extended_arelt_filename (bfd *arch, const char *name, file_ptr *originp)
{
- unsigned long index = 0;
+ unsigned long table_index = 0;
const char *endp;
/* Should extract string so that I can guarantee not to overflow into
the next region, but I'm too lazy. */
errno = 0;
/* Skip first char, which is '/' in SVR4 or ' ' in some other variants. */
- index = strtol (name + 1, (char **) &endp, 10);
- if (errno != 0 || index >= bfd_ardata (arch)->extended_names_size)
+ table_index = strtol (name + 1, (char **) &endp, 10);
+ if (errno != 0 || table_index >= bfd_ardata (arch)->extended_names_size)
{
bfd_set_error (bfd_error_malformed_archive);
return NULL;
@@ -383,7 +383,7 @@ get_extended_arelt_filename (bfd *arch, const char *name, file_ptr *originp)
else
*originp = 0;
- return bfd_ardata (arch)->extended_names + index;
+ return bfd_ardata (arch)->extended_names + table_index;
}
/* This functions reads an arch header and returns an areltdata pointer, or
@@ -656,14 +656,14 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
}
/* Return the BFD which is referenced by the symbol in ABFD indexed by
- INDEX. INDEX should have been returned by bfd_get_next_mapent. */
+ SYM_INDEX. SYM_INDEX should have been returned by bfd_get_next_mapent. */
bfd *
-_bfd_generic_get_elt_at_index (bfd *abfd, symindex index)
+_bfd_generic_get_elt_at_index (bfd *abfd, symindex sym_index)
{
carsym *entry;
- entry = bfd_ardata (abfd)->symdefs + index;
+ entry = bfd_ardata (abfd)->symdefs + sym_index;
return _bfd_get_elt_at_filepos (abfd, entry->file_offset);
}