From: Victor Julien Date: Mon, 9 Dec 2013 18:02:32 +0000 (+0100) Subject: cppcheck: don't use likely/unlikely when -DCPPCHECK is passed to the checker X-Git-Tag: suricata-2.0beta2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ba898b738e1fc085bd6c29548edd8a468bf83bd;p=thirdparty%2Fsuricata.git cppcheck: don't use likely/unlikely when -DCPPCHECK is passed to the checker --- diff --git a/src/util-optimize.h b/src/util-optimize.h index 134ee9d037..bde35ddd81 100644 --- a/src/util-optimize.h +++ b/src/util-optimize.h @@ -24,12 +24,17 @@ * \author Victor Julien */ +#if CPPCHECK==1 +#define likely +#define unlikely +#else #ifndef likely #define likely(expr) __builtin_expect(!!(expr), 1) #endif #ifndef unlikely #define unlikely(expr) __builtin_expect(!!(expr), 0) #endif +#endif /** from http://en.wikipedia.org/wiki/Memory_ordering *