mesa: Add uninitialized_vars macro from the Linux kernel.
authorMatt Turner <mattst88@gmail.com>
Fri, 2 May 2014 19:10:16 +0000 (12:10 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 22 May 2014 17:17:16 +0000 (10:17 -0700)
src/mesa/main/compiler.h

index 97075f58e562807849e103deaf8c1ce09eceb238..600691724345329009d09a279f5e8bdeec41c962 100644 (file)
@@ -264,6 +264,12 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
 #define unreachable()
 #endif
 
+/*
+ * A trick to suppress uninitialized variable warning without generating any
+ * code
+ */
+#define uninitialized_var(x) x = x
+
 #if (__GNUC__ >= 3)
 #define PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))
 #else