assembler: Mark format() as PRINTFLIKE in the disassembler
authorDamien Lespiau <damien.lespiau@intel.com>
Mon, 4 Feb 2013 13:57:48 +0000 (13:57 +0000)
committerDamien Lespiau <damien.lespiau@intel.com>
Mon, 4 Mar 2013 15:54:42 +0000 (15:54 +0000)
So when making changes in code using that function, we get warnings
about mismatches between the format string and arguments.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
assembler/brw_disasm.c

index 3fee682..4dec829 100644 (file)
@@ -27,6 +27,7 @@
 #include <unistd.h>
 #include <stdarg.h>
 
+#include "brw_compat.h"
 #include "brw_context.h"
 #include "brw_defines.h"
 
@@ -400,6 +401,7 @@ static int string (FILE *file, const char *string)
     return 0;
 }
 
+static int format (FILE *f, const char *format, ...) PRINTFLIKE(2, 3);
 static int format (FILE *f, const char *format, ...)
 {
     char    buf[1024];