aboutsummaryrefslogtreecommitdiffstats
path: root/lib/zstd/huf_compress.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2020-11-19 07:11:44 -0600
committerGustavo A. R. Silva <gustavoars@kernel.org>2020-11-19 07:23:47 -0600
commit36f9ff9e03de89691274a6aec45aa079bd3ae405 (patch)
tree79c1e0a1bae6c0463276f4294c4440e0d8c6d78d /lib/zstd/huf_compress.c
parentpowerpc: fix -Wimplicit-fallthrough (diff)
downloadlinux-dev-36f9ff9e03de89691274a6aec45aa079bd3ae405.tar.xz
linux-dev-36f9ff9e03de89691274a6aec45aa079bd3ae405.zip
lib: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Diffstat (limited to 'lib/zstd/huf_compress.c')
-rw-r--r--lib/zstd/huf_compress.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/zstd/huf_compress.c b/lib/zstd/huf_compress.c
index 08b4ae80aed4..fd32838c185f 100644
--- a/lib/zstd/huf_compress.c
+++ b/lib/zstd/huf_compress.c
@@ -560,6 +560,7 @@ size_t HUF_compress1X_usingCTable(void *dst, size_t dstSize, const void *src, si
case 2: HUF_encodeSymbol(&bitC, ip[n + 1], CTable); HUF_FLUSHBITS_1(&bitC);
fallthrough;
case 1: HUF_encodeSymbol(&bitC, ip[n + 0], CTable); HUF_FLUSHBITS(&bitC);
+ fallthrough;
case 0:
default:;
}