]> git.kaiwu.me - haproxy.git/commit
IMPORT: slz-prv: work around lobotomized compilers' fallthrough diagnostics
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Nov 2026 08:21:17 +0000 (09:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Nov 2026 10:08:46 +0000 (11:08 +0100)
commit726d2ba132cc7e1019e051f96a8d7e1a5f15956d
tree55c2c90c2af6d37c088f6eb20eb51e7448e09a47
parent5cd179322c2f84b4557e3aece5e8ea08c58f8313
IMPORT: slz-prv: work around lobotomized compilers' fallthrough diagnostics

When preprocessing and compilation run as separate phases (cpp then
cc, as often happens in distributed builds for example), comments are
stripped before compilation begins. Lobotomized compilers that decide
to emit warnings when they don't see "/* fall through */" comment
annotations that were dropped on the previous phase were just
misdesigned in a hurry and are causing harm.

We already had to do this in tables.h in the past but it's just lost at
the wrong place now. Let's just move that __fallthrough definition into
slz-prv.h where it's easier to locate, and use it in slz_rfc1951_flush()
to silence a compiler warning instead of modifying the code to work around
this absurdity.

This is slz commit 06e2caf45e.
include/import/slz-prv.h
include/import/slz-tables.h
src/slz.c