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 /elfcpp | |
parent | 01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff) | |
download | binutils-gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.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 'elfcpp')
-rw-r--r-- | elfcpp/ChangeLog | 4 | ||||
-rw-r--r-- | elfcpp/elfcpp_file.h | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog index ca6b78b9080..c9ca9f53f7d 100644 --- a/elfcpp/ChangeLog +++ b/elfcpp/ChangeLog @@ -1,3 +1,7 @@ +2009-12-11 Nick Clifton <nickc@redhat.com> + + * elfcpp_file.h: Fix shadowed variable warnings. + 2009-12-10 Doug Kwan <dougkwan@google.com> * arm.h: New enums for EABI object attribute tags and values. diff --git a/elfcpp/elfcpp_file.h b/elfcpp/elfcpp_file.h index 8dd7ad5cca1..d7650d6cc1b 100644 --- a/elfcpp/elfcpp_file.h +++ b/elfcpp/elfcpp_file.h @@ -449,10 +449,10 @@ template<int size, bool big_endian, typename File> unsigned int Elf_file<size, big_endian, File>::find_section_by_type(unsigned int type) { - unsigned int shnum = this->shnum(); + unsigned int tshnum = this->shnum(); typename File::View v(this->file_->view(this->shoff_, - This::shdr_size * shnum)); - for (unsigned int i = 0; i < shnum; i++) + This::shdr_size * tshnum)); + for (unsigned int i = 0; i < tshnum; i++) { Ef_shdr shdr(v.data() + This::shdr_size * i); if (shdr.get_sh_type() == type) @@ -494,8 +494,8 @@ Elf_file<size, big_endian, File>::section_name(unsigned int shndx) off_t shstr_off; typename Elf_types<size>::Elf_WXword shstr_size; { - const unsigned int shstrndx = this->shstrndx_; - typename File::View v(file->view(this->section_header_offset(shstrndx), + const unsigned int fshstrndx = this->shstrndx_; + typename File::View v(file->view(this->section_header_offset(fshstrndx), This::shdr_size)); Ef_shdr shstr_shdr(v.data()); shstr_off = shstr_shdr.get_sh_offset(); |