Merge pull request #185 from scchan/fix_assert_macro

ensure the condition is evaluated before applying the negation operator
This commit is contained in:
Maneesh Gupta
2017-09-21 06:52:21 +05:30
committed by GitHub
melakukan f0933d26cd
@@ -99,7 +99,7 @@ extern int HIP_TRACE_API;
// TODO-HCC add a dummy implementation of assert, need to replace with a proper kernel exit call. // TODO-HCC add a dummy implementation of assert, need to replace with a proper kernel exit call.
#if __HIP_DEVICE_COMPILE__ == 1 #if __HIP_DEVICE_COMPILE__ == 1
#undef assert #undef assert
#define assert(COND) { if (!COND) {abort();} } #define assert(COND) { if (!(COND)) {abort();} }
#endif #endif