diff options
author | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:41:59 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:41:59 +0000 |
commit | 5413b5486ba77949122a8bfd6067d31626e330f3 (patch) | |
tree | 6956d71f05d79d40e52fed28668bf9db104a4a04 /opcodes/cgen-opc.c | |
parent | f28844f209b0de6783df75e402dd1c26f3edb0c7 (diff) | |
download | binutils-redhat-5413b5486ba77949122a8bfd6067d31626e330f3.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 'opcodes/cgen-opc.c')
-rw-r--r-- | opcodes/cgen-opc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/opcodes/cgen-opc.c b/opcodes/cgen-opc.c index 7d52284631..263eb2c4d5 100644 --- a/opcodes/cgen-opc.c +++ b/opcodes/cgen-opc.c @@ -376,10 +376,11 @@ cgen_get_insn_value (CGEN_CPU_DESC cd, unsigned char *buf, int length) for (i = 0; i < length; i += insn_chunk_bitsize) /* NB: i == bits */ { - int index; + int bit_index; bfd_vma this_value; - index = i; /* NB: not dependent on endianness; opposite of cgen_put_insn_value! */ - this_value = bfd_get_bits (& buf[index / 8], insn_chunk_bitsize, big_p); + + bit_index = i; /* NB: not dependent on endianness; opposite of cgen_put_insn_value! */ + this_value = bfd_get_bits (& buf[bit_index / 8], insn_chunk_bitsize, big_p); value = (value << insn_chunk_bitsize) | this_value; } } @@ -414,9 +415,10 @@ cgen_put_insn_value (CGEN_CPU_DESC cd, for (i = 0; i < length; i += insn_chunk_bitsize) /* NB: i == bits */ { - int index; - index = (length - insn_chunk_bitsize - i); /* NB: not dependent on endianness! */ - bfd_put_bits ((bfd_vma) value, & buf[index / 8], insn_chunk_bitsize, big_p); + int bit_index; + + bit_index = (length - insn_chunk_bitsize - i); /* NB: not dependent on endianness! */ + bfd_put_bits ((bfd_vma) value, & buf[bit_index / 8], insn_chunk_bitsize, big_p); value >>= insn_chunk_bitsize; } } |