diff options
author | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:42:17 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:42:17 +0000 |
commit | 91d6fa6a035cc7d0b7be5c99c194a64cb80924b0 (patch) | |
tree | 214507c313b77d619b52afcae2af0b02c9fa700b /opcodes/cr16-dis.c | |
parent | 01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff) | |
download | gdb-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 'opcodes/cr16-dis.c')
-rw-r--r-- | opcodes/cr16-dis.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/opcodes/cr16-dis.c b/opcodes/cr16-dis.c index 3a31d92..0aaf61c 100644 --- a/opcodes/cr16-dis.c +++ b/opcodes/cr16-dis.c @@ -162,9 +162,9 @@ getargtype (operand_type op) string. This routine is used when disassembling the 'CC' instruction. */ static char * -getccstring (unsigned cc) +getccstring (unsigned cc_insn) { - return (char *) cr16_b_cond_tab[cc]; + return (char *) cr16_b_cond_tab[cc_insn]; } @@ -187,12 +187,12 @@ getcinvstring (const char *str) This routine is used when disassembling the 'excp' instruction. */ static char * -gettrapstring (unsigned int index) +gettrapstring (unsigned int trap_index) { const trap_entry *trap; for (trap = cr16_traps; trap < cr16_traps + NUMTRAPS; trap++) - if (trap->entry == index) + if (trap->entry == trap_index) return trap->name; return ILLEGAL; @@ -203,12 +203,12 @@ gettrapstring (unsigned int index) static char * getregname (reg r) { - const reg_entry *reg = cr16_regtab + r; + const reg_entry * regentry = cr16_regtab + r; - if (reg->type != CR16_R_REGTYPE) + if (regentry->type != CR16_R_REGTYPE) return ILLEGAL; - return reg->name; + return regentry->name; } /* Given a register pair enum value, retrieve its name. */ @@ -216,12 +216,12 @@ getregname (reg r) static char * getregpname (reg r) { - const reg_entry *reg = cr16_regptab + r; + const reg_entry * regentry = cr16_regptab + r; - if (reg->type != CR16_RP_REGTYPE) + if (regentry->type != CR16_RP_REGTYPE) return ILLEGAL; - return reg->name; + return regentry->name; } /* Given a index register pair enum value, retrieve its name. */ @@ -229,7 +229,7 @@ getregpname (reg r) static char * getidxregpname (reg r) { - const reg_entry *reg; + const reg_entry * regentry; switch (r) { @@ -245,23 +245,23 @@ getidxregpname (reg r) break; } - reg = cr16_regptab + r; + regentry = cr16_regptab + r; - if (reg->type != CR16_RP_REGTYPE) + if (regentry->type != CR16_RP_REGTYPE) return ILLEGAL; - return reg->name; + return regentry->name; } /* Getting a processor register name. */ static char * -getprocregname (int index) +getprocregname (int reg_index) { const reg_entry *r; for (r = cr16_pregtab; r < cr16_pregtab + NUMPREGS; r++) - if (r->image == index) + if (r->image == reg_index) return r->name; return "ILLEGAL REGISTER"; @@ -270,12 +270,12 @@ getprocregname (int index) /* Getting a processor register name - 32 bit size. */ static char * -getprocpregname (int index) +getprocpregname (int reg_index) { const reg_entry *r; for (r = cr16_pregptab; r < cr16_pregptab + NUMPREGPS; r++) - if (r->image == index) + if (r->image == reg_index) return r->name; return "ILLEGAL REGISTER"; @@ -697,7 +697,7 @@ print_arg (argument *a, bfd_vma memaddr, struct disassemble_info *info) /* Print all the arguments of CURRINSN instruction. */ static void -print_arguments (ins *currInsn, bfd_vma memaddr, struct disassemble_info *info) +print_arguments (ins *currentInsn, bfd_vma memaddr, struct disassemble_info *info) { int i; @@ -705,13 +705,13 @@ print_arguments (ins *currInsn, bfd_vma memaddr, struct disassemble_info *info) if ((IS_INSN_MNEMONIC ("pop") || (IS_INSN_MNEMONIC ("popret") || (IS_INSN_MNEMONIC ("push")))) - && currInsn->nargs == 1) + && currentInsn->nargs == 1) { info->fprintf_func (info->stream, "RA"); return; } - for (i = 0; i < currInsn->nargs; i++) + for (i = 0; i < currentInsn->nargs; i++) { processing_argument_number = i; @@ -725,9 +725,9 @@ print_arguments (ins *currInsn, bfd_vma memaddr, struct disassemble_info *info) if ((INST_HAS_REG_LIST) && (i == 2)) info->fprintf_func (info->stream, "RA"); else - print_arg (&currInsn->arg[i], memaddr, info); + print_arg (¤tInsn->arg[i], memaddr, info); - if ((i != currInsn->nargs - 1) && (!IS_INSN_MNEMONIC ("b"))) + if ((i != currentInsn->nargs - 1) && (!IS_INSN_MNEMONIC ("b"))) info->fprintf_func (info->stream, ","); } } |