From 12cda20aa201dc30ed85ce002ce12419c8668b7f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 30 Jan 2020 17:27:08 +1100 Subject: [PATCH] simplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK (cherry picked from commit 6c2e138d7aac0e7487b2ba2df6796ba64ccfc26b) --- lib/isc/include/isc/likely.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/isc/include/isc/likely.h b/lib/isc/include/isc/likely.h index 6c77957ebd..b127f45027 100644 --- a/lib/isc/include/isc/likely.h +++ b/lib/isc/include/isc/likely.h @@ -15,6 +15,10 @@ /*% * Performance */ +#ifdef CPPCHECK +#define ISC_LIKELY(x) (x) +#define ISC_UNLIKELY(x) (x) +#else #ifdef HAVE_BUILTIN_EXPECT #define ISC_LIKELY(x) __builtin_expect((x), 1) #define ISC_UNLIKELY(x) __builtin_expect((x), 0) @@ -22,5 +26,6 @@ #define ISC_LIKELY(x) (x) #define ISC_UNLIKELY(x) (x) #endif +#endif #endif /* ISC_LIKELY_H */