]> git.kaiwu.me - haproxy.git/commit
MINOR: compiler: add a macro to ignore all arguments
authorWilly Tarreau <w@1wt.eu>
Wed, 1 Jul 2026 12:39:08 +0000 (14:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Jul 2026 14:32:28 +0000 (16:32 +0200)
commit7fc3a52aaf606ff2e55279216676f0419e11d429
tree9f0da89044af0e2a81fb74813d43b2b5364ab8cd
parent50c00ee235f38e1775825ca53cd06418c144f6ea
MINOR: compiler: add a macro to ignore all arguments

Regularly when disabling features (e.g. traces), some macros that would
make use of some arguments end up not consuming them at all, making the
compiler complain that "variable foo defined but not used".

An elegant way to generically mark arguments as used is to pass them to
a variadic function. However a first argument is needed. So we create a
macro that passes (0, __VA_ARGS__) to an inline function that does nothing
from its arguments, and that's done.
include/haproxy/compiler.h