Add -Wshadow to the gcc command line options used when compiling the binutils.

Fix up all warnings generated by the addition of this switch.
This commit is contained in:
Nick Clifton
2009-12-11 13:42:17 +00:00
parent 01fe1b4183
commit 91d6fa6a03
228 changed files with 4810 additions and 4648 deletions

View File

@ -1,6 +1,6 @@
/* Support for 32-bit SPARC NLM (NetWare Loadable Module)
Copyright 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007 Free Software Foundation, Inc.
2007, 2009 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -93,7 +93,7 @@ nlm_sparc_read_reloc (bfd *abfd,
arelent *rel)
{
bfd_vma val, addend;
unsigned int index;
unsigned int howto_index;
unsigned int type;
struct nlm32_sparc_reloc_ext tmp_reloc;
asection *code_sec, *data_sec;
@ -114,12 +114,12 @@ nlm_sparc_read_reloc (bfd *abfd,
rel->addend = addend;
rel->howto = NULL;
for (index = 0;
index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type);
index++)
if (nlm32_sparc_howto_table[index].type == type)
for (howto_index = 0;
howto_index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type);
howto_index++)
if (nlm32_sparc_howto_table[howto_index].type == type)
{
rel->howto = &nlm32_sparc_howto_table[index];
rel->howto = &nlm32_sparc_howto_table[howto_index];
break;
}
@ -139,15 +139,15 @@ nlm_sparc_write_reloc (bfd * abfd, asection * sec, arelent * rel)
{
bfd_vma val;
struct nlm32_sparc_reloc_ext tmp_reloc;
unsigned int index;
unsigned int howto_index;
int type = -1;
reloc_howto_type *tmp;
for (index = 0;
index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type);
index++)
for (howto_index = 0;
howto_index < sizeof (nlm32_sparc_howto_table) / sizeof (reloc_howto_type);
howto_index++)
{
tmp = &nlm32_sparc_howto_table[index];
tmp = &nlm32_sparc_howto_table[howto_index];
if (tmp->rightshift == rel->howto->rightshift
&& tmp->size == rel->howto->size