]> git.ipfire.org Git - thirdparty/zstd.git/commit
[lib] Make lib compatible with `-Wfall-through` excepting legacy
authorNick Terrell <terrelln@fb.com>
Thu, 23 Sep 2021 02:56:07 +0000 (19:56 -0700)
committerNick Terrell <terrelln@fb.com>
Thu, 23 Sep 2021 18:54:14 +0000 (11:54 -0700)
commit20821a46f4122f9abd7c7b245d28162dde8129c9
tree99d77b4d957a3487dcbcdc09aba4717bc44139ee
parent1715601e5524c8af1425680330135e3c7c188428
[lib] Make lib compatible with `-Wfall-through` excepting legacy

Switch to a macro `ZSTD_FALLTHROUGH;` instead of a comment. On supported
compilers this uses an attribute, otherwise it becomes a comment.

This is necessary to be compatible with clang's `-Wfall-through`, and
gcc's `-Wfall-through=2` which don't support comments. Without this the
linux build emits a bunch of warnings.
contrib/linux-kernel/Makefile
contrib/linux-kernel/test/include/linux/compiler.h
lib/common/bitstream.h
lib/common/compiler.h
lib/compress/huf_compress.c
lib/compress/zstd_compress.c
lib/compress/zstd_compress_internal.h
lib/compress/zstd_double_fast.c
lib/decompress/zstd_decompress.c
lib/decompress/zstd_decompress_block.c