Fixup ws_assert() macro

Use a void expression instead of removing the expression
entirely. Under certain conditions, for example as the only
statement in an if() conditional, removing the assertion
will generate compiler warnings.
This commit is contained in:
João Valverde 2021-05-20 00:46:56 +01:00
parent 01144f9109
commit cf0cb5819f
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
#ifndef WS_DISABLE_ASSERT
#define ws_assert(expr) g_assert(expr)
#else
#define ws_assert(expr)
#define ws_assert(expr) (void)0
#endif
/*