inikep / lizard

Lizard (formerly LZ5) is an efficient compressor with very fast decompression. It achieves compression ratio that is comparable to zip/zlib and zstd/brotli (at low and medium compression levels) at decompression speed of 1000 MB/s and faster.
Other
644 stars 40 forks source link

Fix fallthrough warning in gcc #19

Closed FrancescAlted closed 4 years ago

FrancescAlted commented 5 years ago

Hi. While trying to make C-Blosc2 as free of warnings as possible I fixed a fall-through warning in Lizard that only shows up in GCC. The fix here works for GCC, Clang and MSVC (for a detailed discussion see https://dzone.com/articles/implicit-fallthrough-in-gcc-7).

inikep commented 5 years ago

Thanks for pointing the issue out. I fixed the warnings without using __attribute__ ((fallthrough)): https://github.com/inikep/lizard/commit/dda3b335e92ecd5caceccc9c577b39dd4e3c9950

FrancescAlted commented 5 years ago

Ok, so it is good to know that a fallthrough comment is enough :-)