1
0
Fork 0
alistair23-linux/lib/zstd
Gustavo A. R. Silva 224b44d46f lib: zstd: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings:

lib/zstd/bitstream.h:261:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/bitstream.h:262:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/bitstream.h:263:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/bitstream.h:264:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/bitstream.h:265:30: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/compress.c:3183:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/decompress.c:1770:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/decompress.c:2376:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/decompress.c:2404:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/decompress.c:2435:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
lib/zstd/huf_compress.c: In function ‘HUF_compress1X_usingCTable’:
lib/zstd/huf_compress.c:535:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
  if (sizeof((stream)->bitContainer) * 8 < HUF_TABLELOG_MAX * 4 + 7) \
     ^
lib/zstd/huf_compress.c:558:54: note: in expansion of macro ‘HUF_FLUSHBITS_2’
  case 3: HUF_encodeSymbol(&bitC, ip[n + 2], CTable); HUF_FLUSHBITS_2(&bitC);
                                                      ^~~~~~~~~~~~~~~
lib/zstd/huf_compress.c:559:2: note: here
  case 2: HUF_encodeSymbol(&bitC, ip[n + 1], CTable); HUF_FLUSHBITS_1(&bitC);
  ^~~~
lib/zstd/huf_compress.c:531:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
  if (sizeof((stream)->bitContainer) * 8 < HUF_TABLELOG_MAX * 2 + 7) \
     ^
lib/zstd/huf_compress.c:559:54: note: in expansion of macro ‘HUF_FLUSHBITS_1’
  case 2: HUF_encodeSymbol(&bitC, ip[n + 1], CTable); HUF_FLUSHBITS_1(&bitC);
                                                      ^~~~~~~~~~~~~~~
lib/zstd/huf_compress.c:560:2: note: here
  case 1: HUF_encodeSymbol(&bitC, ip[n + 0], CTable); HUF_FLUSHBITS(&bitC);
  ^~~~
  AR      lib/zstd//built-in.a

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough.

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
2019-04-08 18:39:18 -05:00
..
Makefile lib: zstd: clean up Makefile for simpler composite object handling 2018-03-26 02:01:27 +09:00
bitstream.h lib: zstd: Mark expected switch fall-throughs 2019-04-08 18:39:18 -05:00
compress.c lib: zstd: Mark expected switch fall-throughs 2019-04-08 18:39:18 -05:00
decompress.c lib: zstd: Mark expected switch fall-throughs 2019-04-08 18:39:18 -05:00
entropy_common.c lib: Add zstd modules 2017-08-15 09:02:08 -07:00
error_private.h lib: Add zstd modules 2017-08-15 09:02:08 -07:00
fse.h lib: Add zstd modules 2017-08-15 09:02:08 -07:00
fse_compress.c lib: Add zstd modules 2017-08-15 09:02:08 -07:00
fse_decompress.c lib: Add zstd modules 2017-08-15 09:02:08 -07:00
huf.h lib: Add zstd modules 2017-08-15 09:02:08 -07:00
huf_compress.c lib: zstd: Mark expected switch fall-throughs 2019-04-08 18:39:18 -05:00
huf_decompress.c lib: Add zstd modules 2017-08-15 09:02:08 -07:00
mem.h lib: Add zstd modules 2017-08-15 09:02:08 -07:00
zstd_common.c lib: Add zstd modules 2017-08-15 09:02:08 -07:00
zstd_internal.h lib: Add zstd modules 2017-08-15 09:02:08 -07:00
zstd_opt.h lib: Add zstd modules 2017-08-15 09:02:08 -07:00