summaryrefslogtreecommitdiff
path: root/bfd/pef.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-12-11 13:41:59 +0000
committerNick Clifton <nickc@redhat.com>2009-12-11 13:41:59 +0000
commit5413b5486ba77949122a8bfd6067d31626e330f3 (patch)
tree6956d71f05d79d40e52fed28668bf9db104a4a04 /bfd/pef.c
parentf28844f209b0de6783df75e402dd1c26f3edb0c7 (diff)
downloadbinutils-redhat-5413b5486ba77949122a8bfd6067d31626e330f3.tar.gz
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/pef.c')
-rw-r--r--bfd/pef.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/bfd/pef.c b/bfd/pef.c
index b7156f0623..788388cbf7 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -730,14 +730,11 @@ bfd_pef_parse_function_stubs (bfd *abfd,
asymbol **csym)
{
const char *const sprefix = "__stub_";
-
size_t codepos = 0;
unsigned long count = 0;
-
bfd_pef_loader_header header;
bfd_pef_imported_library *libraries = NULL;
bfd_pef_imported_symbol *imports = NULL;
-
unsigned long i;
int ret;
@@ -783,8 +780,7 @@ bfd_pef_parse_function_stubs (bfd *abfd,
asymbol sym;
const char *symname;
char *name;
- unsigned long index;
- int ret;
+ unsigned long sym_index;
if (csym && (csym[count] == NULL))
break;
@@ -802,14 +798,14 @@ bfd_pef_parse_function_stubs (bfd *abfd,
if ((codepos + 4) > codelen)
break;
- ret = bfd_pef_parse_function_stub (abfd, codebuf + codepos, 24, &index);
+ ret = bfd_pef_parse_function_stub (abfd, codebuf + codepos, 24, &sym_index);
if (ret < 0)
{
codepos += 24;
continue;
}
- if (index >= header.total_imported_symbol_count)
+ if (sym_index >= header.total_imported_symbol_count)
{
codepos += 24;
continue;
@@ -819,12 +815,12 @@ bfd_pef_parse_function_stubs (bfd *abfd,
size_t max, namelen;
const char *s;
- if (loaderlen < (header.loader_strings_offset + imports[index].name))
+ if (loaderlen < (header.loader_strings_offset + imports[sym_index].name))
goto error;
- max = loaderlen - (header.loader_strings_offset + imports[index].name);
+ max = loaderlen - (header.loader_strings_offset + imports[sym_index].name);
symname = (char *) loaderbuf;
- symname += header.loader_strings_offset + imports[index].name;
+ symname += header.loader_strings_offset + imports[sym_index].name;
namelen = 0;
for (s = symname; s < (symname + max); s++)
{