This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: fix printf() warnings in bfin-dis.c


ive committed this fix to the Blackfin disassembler code.  otherwise, recent
versions of gcc will emit these fun warnings:
../../opcodes/bfin-dis.c: In function 'decode_multfunc':
../../opcodes/bfin-dis.c:586: error: format not a string literal and no format arguments
../../opcodes/bfin-dis.c:588: error: format not a string literal and no format arguments
../../opcodes/bfin-dis.c: In function 'decode_macfunc':
../../opcodes/bfin-dis.c:605: error: format not a string literal and no format arguments
... about a thousand more ...
-mike

2009-01-14  Mike Frysinger  <vapier@gentoo.org>

	* bfin-dis.c (OUTS): Use "%s" as format string.

RCS file: /cvs/src/src/opcodes/bfin-dis.c,v
retrieving revision 1.9
diff -u -p -r1.9 bfin-dis.c
--- bfin-dis.c	30 Jul 2008 04:34:58 -0000	1.9
+++ bfin-dis.c	14 Jan 2009 19:31:41 -0000
@@ -481,7 +481,7 @@
 
 /* (arch.pm)arch_disassembler_functions.  */
 #ifndef OUTS
-#define OUTS(p, txt) ((p) ? (((txt)[0]) ? (p->fprintf_func)(p->stream, txt) :0) :0)
+#define OUTS(p, txt) ((p) ? (((txt)[0]) ? (p->fprintf_func)(p->stream, "%s", txt) :0) :0)
 #endif
 
 static void

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]