mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
util: Unbreak usage of assert()/debug_assert() inside expressions.
f0ba7d897d 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 <brianp@vmware.com>
This commit is contained in:
parent
92b85fba89
commit
e75e677d28
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue