]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add unreachable code macro
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 7 Jun 2021 14:13:43 +0000 (15:13 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 7 Jun 2021 16:30:09 +0000 (17:30 +0100)
config.h.in

index c52506f8ec765bf05389b7b0980be4836e9f89c2..74f694f888ba5a7ca0fc5e78d9f58ba89c5ba460 100644 (file)
@@ -444,6 +444,12 @@ extern uint64_t ottery_rand_uint64(void);
 #define RSPAMD_CONST_FUNCTION
 #endif
 
+#ifdef __GNUC__
+#define RSPAMD_UNREACHABLE __builtin_unreachable()
+#else
+#define RSPAMD_UNREACHABLE abort()
+#endif
+
 #define HAVE_OPENSSL             1
 #define HAVE_MATH_H              1