[Mesa-dev] [PATCH 1/2] i965/disasm: Mark format() as being printf-style.

Chris Forbes chrisf at ijw.co.nz
Fri Mar 13 11:10:10 PDT 2015


This allows us to get warnings from GCC when we mess up the format
strings.

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/drivers/dri/i965/brw_disasm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 863a6b3..c92c534 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -597,6 +597,9 @@ string(FILE *file, const char *string)
 }
 
 static int
+format(FILE *f, const char *format, ...) PRINTFLIKE(2, 3);
+
+static int
 format(FILE *f, const char *format, ...)
 {
    char buf[1024];
-- 
2.2.2



More information about the mesa-dev mailing list