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

Mike Frysinger vapier@gentoo.org
Wed Jan 14 19:36:00 GMT 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20090114/c0a506ff/attachment.sig>


More information about the Binutils mailing list