mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
Fix compile time warnings
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user