]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Ignore COMPILE_ERROR_IF_TRUE() with --enable-static-checker
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Sep 2021 15:46:39 +0000 (18:46 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 29 Sep 2021 14:44:22 +0000 (14:44 +0000)
src/lib/macros.h

index 3a3db2c3ed91293a4a7f151abf0ab279ab9479cb..930158281eab4f0a5c5107112cd1561a06e1905d 100644 (file)
@@ -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