From e0eda94b6e8fd26bf08c03e75a76caa933fe03d3 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 7 Jul 2005 19:27:52 +0000 Subject: Kaveh Ghazi's printf format attribute checking patch. bfd: * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix format bugs. * vms.h (_bfd_vms_debug): Add format attribute. (_bfd_vms_debug, _bfd_hexdump): Fix typos. binutils: * bucomm.h (report): Add format attribute. * dlltool.c (inform): Likewise. * dllwrap.c (display, inform, warn): Likewise. * objdump.c (objdump_sprintf): Likewise. * readelf.c (error, warn): Likewise. Fix format bugs. gas: * config/tc-tic30.c (debug): Add format attribute. Fix format bugs. include: * dis-asm.h (fprintf_ftype): Add format attribute. opcodes: * arc-dis.c, arm-dis.c, cris-dis.c, crx-dis.c, d10v-dis.c, d30v-dis.c, fr30-dis.c, h8300-dis.c, h8500-dis.c, i860-dis.c, ia64-dis.c, ip2k-dis.c, m10200-dis.c, m10300-dis.c, m88k-dis.c, mcore-dis.c, mips-dis.c, ms1-dis.c, or32-dis.c, ppc-dis.c, sh64-dis.c, sparc-dis.c, tic4x-dis.c, tic80-dis.c, v850-dis.c: Fix format bugs. * ia64-gen.c (fail, warn): Add format attribute. * or32-opc.c (debug): Likewise. --- opcodes/mcore-dis.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'opcodes/mcore-dis.c') diff --git a/opcodes/mcore-dis.c b/opcodes/mcore-dis.c index 1d53c7dadd..24bbff4c5c 100644 --- a/opcodes/mcore-dis.c +++ b/opcodes/mcore-dis.c @@ -198,7 +198,7 @@ print_insn_mcore (memaddr, info) if (inst & 0x400) val |= 0xFFFFFC00; - fprintf (stream, "\t0x%x", memaddr + 2 + (val << 1)); + fprintf (stream, "\t0x%lx", (long)(memaddr + 2 + (val << 1))); if (strcmp (op->name, "bsr") == 0) { @@ -218,8 +218,8 @@ print_insn_mcore (memaddr, info) { long val; val = (inst & 0x000F); - fprintf (stream, "\t%s, 0x%x", - grname[(inst >> 4) & 0xF], memaddr - (val << 1)); + fprintf (stream, "\t%s, 0x%lx", + grname[(inst >> 4) & 0xF], (long)(memaddr - (val << 1))); } break; @@ -244,11 +244,11 @@ print_insn_mcore (memaddr, info) | (ibytes[2] << 8) | (ibytes[3]); /* Removed [] around literal value to match ABI syntax 12/95. */ - fprintf (stream, "\t%s, 0x%X", grname[(inst >> 8) & 0xF], val); + fprintf (stream, "\t%s, 0x%lX", grname[(inst >> 8) & 0xF], val); if (val == 0) - fprintf (stream, "\t// from address pool at 0x%x", - (memaddr + 2 + ((inst & 0xFF) << 2)) & 0xFFFFFFFC); + fprintf (stream, "\t// from address pool at 0x%lx", + (long)(memaddr + 2 + ((inst & 0xFF) << 2)) & 0xFFFFFFFC); } break; @@ -273,7 +273,7 @@ print_insn_mcore (memaddr, info) | (ibytes[2] << 8) | (ibytes[3]); /* Removed [] around literal value to match ABI syntax 12/95. */ - fprintf (stream, "\t0x%X", val); + fprintf (stream, "\t0x%lX", val); /* For jmpi/jsri, we'll try to get a symbol for the target. */ if (info->print_address_func && val != 0) { @@ -282,8 +282,8 @@ print_insn_mcore (memaddr, info) } else { - fprintf (stream, "\t// from address pool at 0x%x", - (memaddr + 2 + ((inst & 0xFF) << 2)) & 0xFFFFFFFC); + fprintf (stream, "\t// from address pool at 0x%lx", + (long)(memaddr + 2 + ((inst & 0xFF) << 2)) & 0xFFFFFFFC); } } break; -- cgit v1.2.1