summaryrefslogtreecommitdiff
path: root/src/mesa/main/compiler.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-09-01 14:39:50 -0700
committerEric Anholt <eric@anholt.net>2010-09-01 17:08:23 -0700
commit3cddc15d9dcf44a0998dd5f29ae6f6d17370584e (patch)
tree86cbeb76ca539edf7b6b318a6832bf7900db6059 /src/mesa/main/compiler.h
parent557a71c50631a232528f654fa8b8e4add0e565d2 (diff)
mesa: Add __printf__ attribute to printf-like functions to get warnings.
Diffstat (limited to 'src/mesa/main/compiler.h')
-rw-r--r--src/mesa/main/compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index e0507ccf86..ded69c3106 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -316,6 +316,11 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
#endif
#endif
+#if (__GNUC__ >= 3)
+#define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
+#else
+#define PRINTFLIKE(f, a)
+#endif
#ifndef NULL
#define NULL 0