aboutsummaryrefslogtreecommitdiff
path: root/opcodes/openrisc-dis.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-09-20 15:28:25 +0000
committerNick Clifton <nickc@redhat.com>2001-09-20 15:28:25 +0000
commitfc05c67f12f75f93a4678cbcd8f1ab8c44beae23 (patch)
tree66d4ea8b7f69fdd8a4337a9a47f57dfaa2dfc1a6 /opcodes/openrisc-dis.c
parent16a419ba0165bc117f5408ed96a1d278e31b42a6 (diff)
downloadgdb-fc05c67f12f75f93a4678cbcd8f1ab8c44beae23.zip
gdb-fc05c67f12f75f93a4678cbcd8f1ab8c44beae23.tar.gz
gdb-fc05c67f12f75f93a4678cbcd8f1ab8c44beae23.tar.bz2
Fix compile time warnings
Diffstat (limited to 'opcodes/openrisc-dis.c')
-rw-r--r--opcodes/openrisc-dis.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/opcodes/openrisc-dis.c b/opcodes/openrisc-dis.c
index 64cab8e..cf9a24f 100644
--- a/opcodes/openrisc-dis.c
+++ b/opcodes/openrisc-dis.c
@@ -51,6 +51,10 @@ static int print_insn PARAMS ((CGEN_CPU_DESC, bfd_vma,
disassemble_info *, char *, int));
static int default_print_insn
PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+void openrisc_cgen_print_operand
+ PARAMS ((CGEN_CPU_DESC, int, PTR, CGEN_FIELDS *, void const *, bfd_vma, int));
+static int read_insn
+ PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *, unsigned long *));
/* -- disassembler routines inserted here */
@@ -77,7 +81,7 @@ openrisc_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
int opindex;
PTR xinfo;
CGEN_FIELDS *fields;
- void const *attrs;
+ void const *attrs ATTRIBUTE_UNUSED;
bfd_vma pc;
int length;
{
@@ -288,7 +292,7 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd;
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
bfd_vma pc;
disassemble_info *info;
char *buf;
@@ -367,7 +371,7 @@ print_insn (cd, pc, info, buf, buflen)
/* Base size may exceed this instruction's size. Extract the
relevant part from the buffer. */
if ((CGEN_INSN_BITSIZE (insn) / 8) < buflen &&
- (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
+ ((unsigned) CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
insn_value_cropped = bfd_get_bits (buf, CGEN_INSN_BITSIZE (insn),
info->endian == BFD_ENDIAN_BIG);
else
@@ -382,8 +386,8 @@ print_insn (cd, pc, info, buf, buflen)
/* Make sure the entire insn is loaded into insn_value, if it
can fit. */
- if (CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize &&
- (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
+ if ( (unsigned) CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize &&
+ ((unsigned) CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
{
unsigned long full_insn_value;
int rc = read_insn (cd, pc, info, buf,