Browse Source

include/starpu_util.h: macros STARPU_ASSERT and STARPU_ASSERT_MSG no longer evaluate their parameters when assertions are disabled

Nathalie Furmento 12 years ago
parent
commit
60596867e1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      include/starpu_util.h

+ 2 - 2
include/starpu_util.h

@@ -68,8 +68,8 @@ extern "C"
 #define STARPU_MAX(a,b)	((a)<(b)?(b):(a))
 
 #ifdef STARPU_NO_ASSERT
-#define STARPU_ASSERT(x)		do { (void) (x);} while(0)
-#define STARPU_ASSERT_MSG(x, msg, ...)	do { (void) (x);} while(0)
+#define STARPU_ASSERT(x)		do { } while(0)
+#define STARPU_ASSERT_MSG(x, msg, ...)	do { } while(0)
 #else
 #  if defined(__CUDACC__) && defined(STARPU_HAVE_WINDOWS)
 #    define STARPU_ASSERT(x)		do { if (STARPU_UNLIKELY(!(x))) *(int*)NULL = 0; } while(0)