summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_debug.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2014-12-12 14:06:17 +0000
committerJosé Fonseca <[email protected]>2014-12-12 14:19:53 +0000
commite75e677d288e67c3c05e7b8744e08cd73bdcbed8 (patch)
treef08f219b3018f40ee4ed6ced0117b681586e4e04 /src/gallium/auxiliary/util/u_debug.h
parent92b85fba89851b85e7a50b1f6f90c05ecaacdcd5 (diff)
util: Unbreak usage of assert()/debug_assert() inside expressions.
f0ba7d897d1c22202531acb70f134f2edc30557d made debug_assert()/assert() unsafe for expressions, but only now that u_atomic.h started to rely on them for Windows that this became an issue. This fixes non-debug builds with MSVC. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_debug.h')
-rw-r--r--src/gallium/auxiliary/util/u_debug.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index badd5e296f6..4c22fdfb6fa 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -185,7 +185,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) do { } while (0 && (expr))
+#define debug_assert(expr) (void)(0 && (expr))
#endif