MINOR: compiler: add a new __decl_thread_var() macro to declare local variables
authorWilly Tarreau <w@1wt.eu>
Wed, 12 Mar 2025 17:08:12 +0000 (18:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 Mar 2025 15:01:04 +0000 (16:01 +0100)
commitf7f2c888b113a3789a4c794f3380c8696e3bbf31
tree93ca8c74c14274fc369cdedc1e17db89a6452293
parentaf1e0b247e64678927793e9cd6e10907b0eebb27
MINOR: compiler: add a new __decl_thread_var() macro to declare local variables

__decl_thread() already exists but is more suited for struct members.
When using it in a variables block, it appends the final trailing
semi-colon which is a statement that ends the variable block. Better
clean this up and have one precisely for variable blocks. In this
case we can simply define an unused enum value that will consume the
semi-colon. That's what the new macro __decl_thread_var() does.

(cherry picked from commit 69ac4cd315f05c69f3c34f824ef4e7f3221966cf)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/compiler.h