From 0a11d75c1bcea6a41f918c650ce44c8d6cf9f0de Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Thu, 9 Jul 2026 16:10:17 +0200 Subject: [PATCH] BUILD: task: Fix build when no 8B CAS is available at all clang (rightfully) complains that when neither HA_CAS_IS_8B nor HA_HAVE_CAS_DW is defined, there is a mismatch when we're doing a CAS, as we're mixing unsigned int and int. To fix that, just turn old_state to an unsigned int, as it should be. This should fix github issue #3441 --- include/haproxy/task.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/task.h b/include/haproxy/task.h index a1a33defe..b0da721af 100644 --- a/include/haproxy/task.h +++ b/include/haproxy/task.h @@ -245,7 +245,7 @@ static inline int __task_set_state_and_tid(struct task *t, int expected_tid, int #endif return 1; #else /* !HA_CAS_IS_8B && !HA_HAVE_CAS_DW */ - int old_state; + unsigned int old_state; int ret = 0; HA_SPIN_LOCK(OTHER_LOCK, &task_state_tid); -- 2.47.3