summaryrefslogtreecommitdiff
path: root/bfd/xtensa-isa.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-12-11 13:41:59 +0000
committerNick Clifton <nickc@redhat.com>2009-12-11 13:41:59 +0000
commit0ae5ed34cd818c894f9633ce356d1f39067d6dab (patch)
treec4ff227f63cb55ba2b14b460ba2cd633413fce03 /bfd/xtensa-isa.c
parent03978e229064bebbca9f30bd553ae88c82fbb986 (diff)
downloadgdb-0ae5ed34cd818c894f9633ce356d1f39067d6dab.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 'bfd/xtensa-isa.c')
-rw-r--r--bfd/xtensa-isa.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/bfd/xtensa-isa.c b/bfd/xtensa-isa.c
index 138f6eceb72..26deaaa7eac 100644
--- a/bfd/xtensa-isa.c
+++ b/bfd/xtensa-isa.c
@@ -1,5 +1,5 @@
/* Configurable Xtensa ISA support.
- Copyright 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1028,15 +1028,14 @@ xtensa_operand_encode (xtensa_isa isa, xtensa_opcode opc, int opnd,
uint32 test_val, orig_val;
intop = get_operand (intisa, opc, opnd);
- if (!intop) return -1;
+ if (!intop)
+ return -1;
if (!intop->encode)
{
/* This is a default operand for a field. How can we tell if the
value fits in the field? Write the value into the field,
read it back, and then make sure we get the same value. */
-
- xtensa_isa_internal *intisa = (xtensa_isa_internal *) isa;
static xtensa_insnbuf tmpbuf = 0;
int slot_id;
@@ -1081,9 +1080,9 @@ xtensa_operand_encode (xtensa_isa isa, xtensa_opcode opc, int opnd,
was successfully encoded is to decode it and check if it matches
the original value. */
orig_val = *valp;
- if ((*intop->encode) (valp) ||
- (test_val = *valp, (*intop->decode) (&test_val)) ||
- test_val != orig_val)
+ if ((*intop->encode) (valp)
+ || (test_val = *valp, (*intop->decode) (&test_val))
+ || test_val != orig_val)
{
xtisa_errno = xtensa_isa_bad_value;
sprintf (xtisa_error_msg, "cannot encode operand value 0x%08x", *valp);