summaryrefslogtreecommitdiff
path: root/opcodes/cgen-opc.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 /opcodes/cgen-opc.c
parent01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff)
downloadbinutils-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 'opcodes/cgen-opc.c')
-rw-r--r--opcodes/cgen-opc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/opcodes/cgen-opc.c b/opcodes/cgen-opc.c
index 7d522846319..263eb2c4d58 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;
}
}