diff options
author | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:42:17 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:42:17 +0000 |
commit | 91d6fa6a035cc7d0b7be5c99c194a64cb80924b0 (patch) | |
tree | 214507c313b77d619b52afcae2af0b02c9fa700b /bfd/pef.c | |
parent | 01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff) | |
download | gdb-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/pef.c')
-rw-r--r-- | bfd/pef.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -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++) { |