Quellcode durchsuchen

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

Nathalie Furmento vor 12 Jahren
Ursprung
Commit
60596867e1
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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)