]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: stick-tables: silence build warnings when threads are disabled
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Apr 2024 06:19:20 +0000 (08:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Apr 2024 06:23:56 +0000 (08:23 +0200)
commit19f8762a986bfe4508d687f428d1b758f96ac2ec
tree216897eec065023de5778d9b19ff97027c173377
parent589fb12904608f2f5dcd89ae1f61e229f0bc1865
BUILD: stick-tables: silence build warnings when threads are disabled

Since 3.0-dev7 with commit 1a088da7c2 ("MAJOR: stktable: split the keys
across multiple shards to reduce contention"), building without threads
yields a warning about the shard not being used. This is because the
locks API does nothing of its arguments, which is the only place where
the shard is being used. We cannot modify the lock API to pretend to
consume its argument because quite often it's not even instantiated.
Let's just pretend we consume shard using an explict ALREADY_CHECKED()
statement instead. While we're at it, let's make sure that XXH32() is
not called when there is a single bucket!

No backport is needed.
include/haproxy/stick_table.h
src/stick_table.c