diff --git a/src/suricata-common.h b/src/suricata-common.h index 0d7b691ddd..4bee62b026 100644 --- a/src/suricata-common.h +++ b/src/suricata-common.h @@ -202,12 +202,16 @@ #endif #endif /* !__CYGWIN__ */ +#if CPPCHECK==1 +#define BUG_ON(x) if (((x))) exit(1) +#else #ifdef HAVE_ASSERT_H #include #define BUG_ON(x) assert(!(x)) #else #define BUG_ON(x) #endif +#endif /* we need this to stringify the defines which are supplied at compiletime see: http://gcc.gnu.org/onlinedocs/gcc-3.4.1/cpp/Stringification.html#Stringification */