core: make nm_assert() always compile condition

Even if asserts are not enabled, still let the compiler see what we would
assert. Otherwise, we get warnings about unused variables or we migth miss
compile errors inside nm_assert().
This commit is contained in:
Thomas Haller 2015-05-26 18:08:04 +02:00
parent ce2ea51ed0
commit fe3e1849b7

View file

@ -105,7 +105,7 @@
#ifdef NM_MORE_ASSERTS
#define nm_assert(cond) G_STMT_START { g_assert (cond); } G_STMT_END
#else
#define nm_assert(cond) G_STMT_START { (void) 0; } G_STMT_END
#define nm_assert(cond) G_STMT_START { if (FALSE) { if (cond) { } } } G_STMT_END
#endif
/*****************************************************************************/