aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.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/libbfd.c
parent01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff)
downloadgdb-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/libbfd.c')
-rw-r--r--bfd/libbfd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index f79e190..b378622 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -1,6 +1,6 @@
/* Assorted BFD support routines, only used internally.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -804,9 +804,9 @@ bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p)
bytes = bits / 8;
for (i = 0; i < bytes; i++)
{
- int index = big_p ? bytes - i - 1 : i;
+ int addr_index = big_p ? bytes - i - 1 : i;
- addr[index] = data & 0xff;
+ addr[addr_index] = data & 0xff;
data >>= 8;
}
}
@@ -826,9 +826,9 @@ bfd_get_bits (const void *p, int bits, bfd_boolean big_p)
bytes = bits / 8;
for (i = 0; i < bytes; i++)
{
- int index = big_p ? i : bytes - i - 1;
+ int addr_index = big_p ? i : bytes - i - 1;
- data = (data << 8) | addr[index];
+ data = (data << 8) | addr[addr_index];
}
return data;