Skip to content

Commit

Permalink
lib: zstd: Fix attribute declaration
Browse files Browse the repository at this point in the history
fallthrough, __fallthrough__ and [[fallthrough]] are compiler dependent.
Hence let's use a generic fallthrough implementation which is __attribute__((__fallthrough__))

Test: lib/zstd/ compiled successfully with this change using GCC 12.0.0 / Clang 14.0.0 .
Signed-off-by: Cyber Knight <[email protected]>
  • Loading branch information
cyberknight777 committed Nov 18, 2021
1 parent 6ff01e4 commit edc41e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zstd/common/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
* - CPP17: https://en.cppreference.com/w/cpp/language/attributes/fallthrough
* - Else: __attribute__((__fallthrough__))
*/
#define ZSTD_FALLTHROUGH fallthrough
#define ZSTD_FALLTHROUGH __attribute__((__fallthrough__))

/* detects whether we are being compiled under msan */

Expand Down

0 comments on commit edc41e9

Please sign in to comment.