From: Timo Sirainen Date: Wed, 22 Sep 2021 15:46:39 +0000 (+0300) Subject: lib: Ignore COMPILE_ERROR_IF_TRUE() with --enable-static-checker X-Git-Tag: 2.3.18~320 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37ab021b41110232ac196447b27759084fcb0847;p=thirdparty%2Fdovecot%2Fcore.git lib: Ignore COMPILE_ERROR_IF_TRUE() with --enable-static-checker --- diff --git a/src/lib/macros.h b/src/lib/macros.h index 3a3db2c3ed..930158281e 100644 --- a/src/lib/macros.h +++ b/src/lib/macros.h @@ -188,7 +188,8 @@ static inline const char *container_of_ptr(const void *ptr, size_t offset) # define CALLBACK_TYPECHECK(callback, type) 0 #endif -#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) && !defined(__cplusplus) +#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) && \ + !defined(__cplusplus) && !defined(STATIC_CHECKER) # define COMPILE_ERROR_IF_TRUE(condition) \ (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) #else