mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Added -Wimplicit-fallthrough
Added compiler flag to check for fall through in case statements.
This commit is contained in:
@ -29,3 +29,11 @@
|
||||
#else
|
||||
#define WSREP_OVERRIDE
|
||||
#endif // __cplusplus >= 201103L
|
||||
|
||||
#if defined(__clang__) && __cplusplus >= 201103L
|
||||
#define WSREP_FALLTHROUGH [[clang::fallthrough]]
|
||||
#elif (defined(__GNUC__) || defined(__GNUG__)) && (__GNUC__ >= 7)
|
||||
#define WSREP_FALLTHROUGH __attribute__((fallthrough))
|
||||
#else
|
||||
#define WSREP_FALLTHROUGH
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user