]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: queues: Use unsigned int when needed
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 28 Jan 2025 17:03:11 +0000 (18:03 +0100)
committerOlivier Houchard <cognet@ci0.org>
Tue, 28 Jan 2025 16:44:54 +0000 (17:44 +0100)
Use unsigned int instead of int when calculating which thread group we
should dequeue from next, as the difference in signedness makes clang
unhappy.

src/queue.c

index 2e8e861a57b06f35ba319f3b22ad69dcbfd50ebc..4af08d123a3147fc8512ca08324235fedc4e500e 100644 (file)
@@ -428,7 +428,7 @@ int process_srv_queue(struct server *s)
               self_served = _HA_ATOMIC_LOAD(&s->per_tgrp[tgid - 1].self_served) % (MAX_SELF_USE_QUEUE + 1);
               if ((self_served == MAX_SELF_USE_QUEUE && non_empty_tgids != (1UL << (tgid - 1))) ||
                    !(non_empty_tgids & (1UL << (tgid - 1)))) {
-                       int old_served, new_served;
+                       unsigned int old_served, new_served;
 
                        /*
                         * We want to dequeue from another queue. The last