Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix parameter when calling MC_assert.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 11 Dec 2019 21:20:41 +0000 (22:20 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 12 Dec 2019 09:48:32 +0000 (10:48 +0100)
A cast to (int) is wrong with e.g. (0.2) or (1UL<<32).

include/smpi/mpi.h

index b2c6e2b..df033ad 100644 (file)
@@ -19,7 +19,7 @@
 
 #if SIMGRID_HAVE_MC
 #undef assert
-#define assert(x) MC_assert((int)(x))
+#define assert(x) MC_assert(!!(x))
 #endif
 
 #ifdef TRACE_CALL_LOCATION /* Defined by smpicc on the command line */