]> git.ipfire.org Git - thirdparty/haproxy.git/commit
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>
Wed, 12 Mar 2025 17:08:12 +0000 (18:08 +0100)
commit69ac4cd315f05c69f3c34f824ef4e7f3221966cf
tree083c04f6e912d0cd8e9d94881f5bf0e65514711e
parentbb4addabb742f2305ad6667ed42ebb12f5df2af3
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.
include/haproxy/compiler.h