Skip to content

Commit 0a91c6d

Browse files
committed
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.
1 parent 1eebf98 commit 0a91c6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/haproxy/bug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#else // not x86
6969

7070
/* generic implementation, causes a segfault */
71-
static inline __attribute((always_inline)) void ha_crash_now(void)
71+
static inline __attribute((always_inline,noreturn,unused)) void ha_crash_now(void)
7272
{
7373
#if __GNUC_PREREQ__(5, 0)
7474
#pragma GCC diagnostic push

0 commit comments

Comments
 (0)