From 3cddc15d9dcf44a0998dd5f29ae6f6d17370584e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Sep 2010 14:39:50 -0700 Subject: mesa: Add __printf__ attribute to printf-like functions to get warnings. --- src/mesa/main/compiler.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/main/compiler.h') diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index e0507ccf864..ded69c3106c 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 -- cgit v1.2.3