From: Timo Sirainen Date: Mon, 9 Nov 2020 13:39:57 +0000 (+0200) Subject: lib: COMPILE_ERROR_IF_TRUE() - Return FALSE instead of 0 X-Git-Tag: 2.3.14.rc1~371 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=876a22a195b088670558d9ef2a80c17364f4708d;p=thirdparty%2Fdovecot%2Fcore.git lib: COMPILE_ERROR_IF_TRUE() - Return FALSE instead of 0 This will be needed for the following changes to avoid warnings with -Wstrict-bool. --- diff --git a/src/lib/macros.h b/src/lib/macros.h index 879880d7dc..e93ce6352d 100644 --- a/src/lib/macros.h +++ b/src/lib/macros.h @@ -152,9 +152,9 @@ #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) && !defined(__cplusplus) # define COMPILE_ERROR_IF_TRUE(condition) \ - (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) - 1) + (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) #else -# define COMPILE_ERROR_IF_TRUE(condition) 0 +# define COMPILE_ERROR_IF_TRUE(condition) FALSE #endif #ifdef HAVE_TYPE_CHECKS