1
0
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:
mkaruza
2018-12-31 15:04:10 +01:00
parent 7e9419e811
commit b9f371c269
4 changed files with 18 additions and 4 deletions

View File

@ -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