Commit a831e0f7 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

When ISC assertions are disabled, still execute the condition to prevent...

When ISC assertions are disabled, still execute the condition to prevent unused variable warnings/errors from the compiler
parent 461ffead
......@@ -80,7 +80,7 @@ isc_assertion_typetotext(isc_assertiontype_t type);
isc_assertiontype_require, \
#cond), 0)))
#else
#define ISC_REQUIRE(cond) ((void) 0)
#define ISC_REQUIRE(cond) ((void) ISC_LIKELY(cond))
#endif /* ISC_CHECK_REQUIRE */
#if ISC_CHECK_ENSURE != 0
......@@ -90,7 +90,7 @@ isc_assertion_typetotext(isc_assertiontype_t type);
isc_assertiontype_ensure, \
#cond), 0)))
#else
#define ISC_ENSURE(cond) ((void) 0)
#define ISC_ENSURE(cond) ((void) ISC_LIKELY(cond))
#endif /* ISC_CHECK_ENSURE */
#if ISC_CHECK_INSIST != 0
......@@ -100,7 +100,7 @@ isc_assertion_typetotext(isc_assertiontype_t type);
isc_assertiontype_insist, \
#cond), 0)))
#else
#define ISC_INSIST(cond) ((void) 0)
#define ISC_INSIST(cond) ((void) ISC_LIKELY(cond))
#endif /* ISC_CHECK_INSIST */
#if ISC_CHECK_INVARIANT != 0
......@@ -110,7 +110,7 @@ isc_assertion_typetotext(isc_assertiontype_t type);
isc_assertiontype_invariant, \
#cond), 0)))
#else
#define ISC_INVARIANT(cond) ((void) 0)
#define ISC_INVARIANT(cond) ((void) ISC_LIKELY(cond))
#endif /* ISC_CHECK_INVARIANT */
ISC_LANG_ENDDECLS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment