From: Victor Julien Date: Mon, 9 Dec 2013 17:48:22 +0000 (+0100) Subject: cppcheck: improve reporting cppcheck when passing -DCPPCHECK to the checker. X-Git-Tag: suricata-2.0beta2~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe46c26e4e76abb873a36d4042e018fb9e2b480a;p=thirdparty%2Fsuricata.git cppcheck: improve reporting cppcheck when passing -DCPPCHECK to the checker. --- diff --git a/src/util-mem.h b/src/util-mem.h index 1379b83178..aaabd0158c 100644 --- a/src/util-mem.h +++ b/src/util-mem.h @@ -32,6 +32,17 @@ #include "util-atomic.h" +#if CPPCHECK==1 +#define SCMalloc malloc +#define SCCalloc calloc +#define SCRealloc realloc +#define SCFree free +#define SCStrdup strdup +#define SCMallocAligned _mm_malloc +#define SCFreeAligned _mm_free +#else /* CPPCHECK */ + + #if defined(_WIN32) || defined(__WIN32) #include "mm_malloc.h" #endif @@ -292,5 +303,7 @@ SC_ATOMIC_EXTERN(unsigned int, engine_stage); #endif /* DBG_MEM_ALLOC */ +#endif /* CPPCHECK */ + #endif /* __UTIL_MEM_H__ */