From: Timo Sirainen Date: Thu, 3 Jun 2021 13:50:39 +0000 (+0300) Subject: lib: Don't use special code for i_unreached() with STATIC_CHECKER X-Git-Tag: 2.3.16~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df1b4b8750fdb87d38ac9accb8a1dea02ac3ce2e;p=thirdparty%2Fdovecot%2Fcore.git lib: Don't use special code for i_unreached() with STATIC_CHECKER This was done originally to help scan-build, but this is no longer necessary. Also actually running code where __builtin_unreachable() was reached produced (very weird) undefined behavior. Reverts e2e9ea6da9f3db5fd7fe467db79232d20d03832f --- diff --git a/src/lib/macros.h b/src/lib/macros.h index c66e26ef0b..cecd56913a 100644 --- a/src/lib/macros.h +++ b/src/lib/macros.h @@ -234,12 +234,8 @@ #endif -#ifndef STATIC_CHECKER -# define i_unreached() \ +#define i_unreached() \ i_panic("file %s: line %d: unreached", __FILE__, __LINE__) -#else -# define i_unreached() __builtin_unreachable() -#endif /* Convenience macros to test the versions of dovecot. */ #if defined DOVECOT_VERSION_MAJOR && defined DOVECOT_VERSION_MINOR