projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e6f9ea
)
gallium: Guard assertions by NDEBUG instead of DEBUG
author
Michel Dänzer
<michel.daenzer@amd.com>
Tue, 7 Nov 2017 09:48:12 +0000
(10:48 +0100)
committer
Michel Dänzer
<michel@daenzer.net>
Tue, 7 Nov 2017 15:47:15 +0000
(16:47 +0100)
This matches the standard assert.h header.
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_debug.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_debug.h
b/src/gallium/auxiliary/util/u_debug.h
index 63940b72253ad90cc7fc206bccd732bca180738f..d2ea89f59c10e1bc0944b537ff1da54dbb5bb05c 100644
(file)
--- 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,
* For non debug builds the assert macro will expand to a no-op, so do not
* call functions with side effects in the assert expression.
*/
-#if
def
DEBUG
+#if
ndef N
DEBUG
#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
#else
#define debug_assert(expr) (void)(0 && (expr))