From 0a91c6dcaebd41ead51f3654ca96d564ccda32af Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 16 May 2025 16:12:12 +0200 Subject: [PATCH] BUILD: debug: mark ha_crash_now() as attribute(noreturn) 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/bug.h b/include/haproxy/bug.h index 71d302e87..c43e0cdea 100644 --- a/include/haproxy/bug.h +++ b/include/haproxy/bug.h @@ -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