mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
When ISC assertions are disabled, still execute the condition to prevent unused variable warnings/errors from the compiler
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user