aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-07-30 04:34:58 +0000
committerAlan Modra <amodra@gmail.com>2008-07-30 04:34:58 +0000
commit0af1713e7cd57b52f6c81f73aa58934132198880 (patch)
treeaf4b52a6c5f3c8cd570e4f266f019cf552d6f442 /opcodes
parent22ad7fee2a313665df38ad7177f962f7c13ad0b6 (diff)
downloadgdb-0af1713e7cd57b52f6c81f73aa58934132198880.zip
gdb-0af1713e7cd57b52f6c81f73aa58934132198880.tar.gz
gdb-0af1713e7cd57b52f6c81f73aa58934132198880.tar.bz2
Silence gcc printf warnings
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/bfin-dis.c6
-rw-r--r--opcodes/cris-dis.c7
-rw-r--r--opcodes/i386-dis.c5
-rw-r--r--opcodes/or32-opc.c5
5 files changed, 18 insertions, 9 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 4110c10..cadea97 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-30 Alan Modra <amodra@bigpond.net.au>
+
+ * bfin-dis.c, cris-dis.c, i386-dis.c, or32-opc.c: Silence gcc warnings.
+
2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
* mips-dis.c (_print_insn_mips): Use ELF_ST_IS_MIPS16.
diff --git a/opcodes/bfin-dis.c b/opcodes/bfin-dis.c
index d74fa58..e68b7d5 100644
--- a/opcodes/bfin-dis.c
+++ b/opcodes/bfin-dis.c
@@ -1,5 +1,5 @@
/* Disassemble ADI Blackfin Instructions.
- Copyright 2005, 2007 Free Software Foundation, Inc.
+ Copyright 2005, 2007, 2008 Free Software Foundation, Inc.
This file is part of libopcodes.
@@ -148,7 +148,7 @@ fmtconst (const_forms_t cf, TIword x, bfd_vma pc, disassemble_info * outf)
}
else
{
- sprintf (buf, "%lx", x);
+ sprintf (buf, "%lx", (unsigned long) x);
return buf;
}
}
@@ -186,7 +186,7 @@ fmtconst (const_forms_t cf, TIword x, bfd_vma pc, disassemble_info * outf)
if (constant_formats[cf].issigned && x < 0)
sprintf (buf, "-0x%x", abs (x));
else
- sprintf (buf, "0x%lx", x);
+ sprintf (buf, "0x%lx", (unsigned long) x);
}
return buf;
diff --git a/opcodes/cris-dis.c b/opcodes/cris-dis.c
index 64e55e2..01e69ca 100644
--- a/opcodes/cris-dis.c
+++ b/opcodes/cris-dis.c
@@ -1,5 +1,5 @@
/* Disassembler code for CRIS.
- Copyright 2000, 2001, 2002, 2004, 2005, 2006, 2007
+ Copyright 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Axis Communications AB, Lund, Sweden.
Written by Hans-Peter Nilsson.
@@ -581,7 +581,10 @@ static char *
format_dec (long number, char *outbuffer, int signedp)
{
last_immediate = number;
- sprintf (outbuffer, signedp ? "%ld" : "%lu", number);
+ if (signedp)
+ sprintf (outbuffer, "%ld", number);
+ else
+ sprintf (outbuffer, "%lu", (unsigned long) number);
return outbuffer + strlen (outbuffer);
}
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 4f3c9e0..c0688cf 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1,6 +1,7 @@
/* Print i386 instructions for GDB, the GNU debugger.
Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
@@ -11234,7 +11235,7 @@ print_displacement (char *buf, bfd_vma disp)
buf[j++] = '0';
buf[j++] = 'x';
- sprintf_vma (tmp, val);
+ sprintf_vma (tmp, (bfd_vma) val);
for (i = 0; tmp[i] == '0'; i++)
continue;
if (tmp[i] == '\0')
diff --git a/opcodes/or32-opc.c b/opcodes/or32-opc.c
index e52dbd6..aa94c13 100644
--- a/opcodes/or32-opc.c
+++ b/opcodes/or32-opc.c
@@ -1,5 +1,5 @@
/* Table of opcodes for the OpenRISC 1000 ISA.
- Copyright 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
Contributed by Damjan Lampret (lampret@opencores.org).
This file is part of the GNU opcodes library.
@@ -586,7 +586,8 @@ cover_insn (unsigned long * cur, int pass, unsigned int mask)
c = cover_insn (cur, curpass, mask & (~(cur_mask << best_first)));
if (c)
{
- debug (8, "%li> #%X -> %lu\n", (long)(next - automata), i, (long)(cur - automata));
+ debug (8, "%li> #%X -> %lu\n", (long)(next - automata), i,
+ (unsigned long)(cur - automata));
*next = cur - automata;
cur = c;
}