Apply to the BT_ASSERT_PRE() macro (and its derivatives) the same trick
used for BT_ASSERT() to use the condition without evaluating it when the
macro is disabled. This avoids unused variable compiler warnings in a
production build.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
*/
# define BT_ASSERT_PRE_MSG BT_LIB_LOGF
#else
-# define BT_ASSERT_PRE(_cond, _fmt, ...)
+# define BT_ASSERT_PRE(_cond, _fmt, ...) ((void) sizeof((void) (_cond), 0))
# define BT_ASSERT_PRE_FUNC BT_UNUSED
# define BT_ASSERT_PRE_MSG(_fmt, ...)
#endif /* BT_DEV_MODE */