util: fix debug_assert() to avoid unused variable warnings in release builds
authorKeith Whitwell <keithw@vmware.com>
Thu, 12 Mar 2009 16:56:24 +0000 (16:56 +0000)
committerKeith Whitwell <keithw@vmware.com>
Thu, 12 Mar 2009 16:57:30 +0000 (16:57 +0000)
src/gallium/auxiliary/util/u_debug.h

index b298b9b..7c82970 100644 (file)
@@ -162,7 +162,7 @@ void _debug_assert_fail(const char *expr,
 #ifdef DEBUG
 #define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
 #else
-#define debug_assert(expr) ((void)0)
+#define debug_assert(expr) ((void)(expr))
 #endif