summaryrefslogtreecommitdiff
path: root/bfd/elf32-ip2k.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/elf32-ip2k.c
parent01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff)
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/elf32-ip2k.c')
-rw-r--r--bfd/elf32-ip2k.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 96d0cd5ba9..40c2205d38 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1,5 +1,5 @@
/* Ubicom IP2xxx specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -347,7 +347,7 @@ ip2k_is_switch_table_128 (bfd *abfd ATTRIBUTE_UNUSED,
bfd_byte *contents)
{
bfd_byte code[4];
- int index = 0;
+ int table_index = 0;
/* Check current page-jmp. */
if (addr + 4 > sec->size)
@@ -369,13 +369,13 @@ ip2k_is_switch_table_128 (bfd *abfd ATTRIBUTE_UNUSED,
ip2k_get_mem (abfd, contents + addr - 4, 4, code);
if ((IS_ADD_W_WREG_OPCODE (code + 0))
&& (IS_ADD_PCL_W_OPCODE (code + 2)))
- return index;
+ return table_index;
if ((! IS_PAGE_OPCODE (code + 0))
|| (! IS_JMP_OPCODE (code + 2)))
return -1;
- index++;
+ table_index++;
addr -= 4;
}
}
@@ -427,7 +427,7 @@ ip2k_is_switch_table_256 (bfd *abfd ATTRIBUTE_UNUSED,
bfd_byte *contents)
{
bfd_byte code[16];
- int index = 0;
+ int table_index = 0;
/* Check current page-jmp. */
if (addr + 4 > sec->size)
@@ -454,7 +454,7 @@ ip2k_is_switch_table_256 (bfd *abfd ATTRIBUTE_UNUSED,
&& (IS_INC_1SP_OPCODE (code + 10))
&& (IS_PAGE_OPCODE (code + 12))
&& (IS_JMP_OPCODE (code + 14)))
- return index;
+ return table_index;
if ((IS_ADD_W_WREG_OPCODE (code + 2))
&& (IS_SNC_OPCODE (code + 4))
@@ -463,13 +463,13 @@ ip2k_is_switch_table_256 (bfd *abfd ATTRIBUTE_UNUSED,
&& (IS_SNC_OPCODE (code + 10))
&& (IS_INC_1SP_OPCODE (code + 12))
&& (IS_JMP_OPCODE (code + 14)))
- return index;
+ return table_index;
if ((! IS_PAGE_OPCODE (code + 0))
|| (! IS_JMP_OPCODE (code + 2)))
return -1;
- index++;
+ table_index++;
addr -= 4;
}
}