From 91d6fa6a035cc7d0b7be5c99c194a64cb80924b0 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 11 Dec 2009 13:42:17 +0000 Subject: Add -Wshadow to the gcc command line options used when compiling the binutils. Fix up all warnings generated by the addition of this switch. --- opcodes/ns32k-dis.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'opcodes/ns32k-dis.c') diff --git a/opcodes/ns32k-dis.c b/opcodes/ns32k-dis.c index e96bdf4470d..ed6e165073c 100644 --- a/opcodes/ns32k-dis.c +++ b/opcodes/ns32k-dis.c @@ -1,6 +1,6 @@ /* Print National Semiconductor 32000 instructions. - Copyright 1986, 1988, 1991, 1992, 1994, 1998, 2001, 2002, 2005, 2007 - Free Software Foundation, Inc. + Copyright 1986, 1988, 1991, 1992, 1994, 1998, 2001, 2002, 2005, 2007, + 2009 Free Software Foundation, Inc. This file is part of the GNU opcodes library. @@ -466,7 +466,6 @@ print_insn_arg (int d, int Ivalue; int addr_mode; int disp1, disp2; - int index; int size; switch (d) @@ -616,17 +615,17 @@ print_insn_arg (int d, case 0x1d: case 0x1e: case 0x1f: - /* Scaled index basemode[R0 -- R7:B,W,D,Q]. */ - index = bit_extract (buffer, index_offset - 8, 3); - print_insn_arg (d, index_offset, aoffsetp, buffer, addr, - result, 0); { + int bit_index; static const char *ind = "bwdq"; char *off; - + + /* Scaled index basemode[R0 -- R7:B,W,D,Q]. */ + bit_index = bit_extract (buffer, index_offset - 8, 3); + print_insn_arg (d, index_offset, aoffsetp, buffer, addr, + result, 0); off = result + strlen (result); - sprintf (off, "[r%d:%c]", index, - ind[addr_mode & 3]); + sprintf (off, "[r%d:%c]", bit_index, ind[addr_mode & 3]); } break; } -- cgit v1.2.1