]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: debug: mark ha_crash_now() as attribute(noreturn)
authorWilly Tarreau <w@1wt.eu>
Fri, 16 May 2025 14:12:12 +0000 (16:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 16 May 2025 14:43:53 +0000 (16:43 +0200)
Building on MIPS64 with clang16 incorrectly reports some uninitialized
value warnings in stats-proxy.c due to some calls to ABORT_NOW() where
the compiler didn't know the code wouldn't return. Let's properly mark
the function as noreturn, and take this opportunity for also marking it
unused to avoid possible warnings depending on the build options (if
ABORT_NOW is not used). No backport needed though it will not harm.

include/haproxy/bug.h

index 71d302e879c2cd8e4c81c691ff1cd3776d22e06c..c43e0cdea3fe9798307eee71e2be066671bfd98e 100644 (file)
@@ -68,7 +68,7 @@
 #else // not x86
 
 /* generic implementation, causes a segfault */
-static inline __attribute((always_inline)) void ha_crash_now(void)
+static inline __attribute((always_inline,noreturn,unused)) void ha_crash_now(void)
 {
 #if __GNUC_PREREQ__(5, 0)
 #pragma GCC diagnostic push