mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Rework FALL_THROUGH definition to use fallthrough if defined.
This commit is contained in:
@ -311,13 +311,13 @@ decouple library dependencies with standard string, memory and so on.
|
||||
#ifndef FALL_THROUGH
|
||||
/* GCC 7 has new switch() fall-through detection */
|
||||
#if defined(__GNUC__)
|
||||
#if ((__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 1)))
|
||||
#if defined(WOLFSSL_LINUXKM) && defined(fallthrough)
|
||||
#if defined(fallthrough)
|
||||
#define FALL_THROUGH fallthrough
|
||||
#else
|
||||
/* Use __ notation to avoid conflicts */
|
||||
#define FALL_THROUGH ; __attribute__ ((__fallthrough__))
|
||||
#endif
|
||||
#elif ((__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 1)))
|
||||
#define FALL_THROUGH ; __attribute__ ((fallthrough))
|
||||
#elif defined(__clang__) && defined(__clang_major__) &&
|
||||
(__clang_major__ >= 4)
|
||||
#define FALL_THROUGH ; __attribute__ ((fallthrough))
|
||||
#endif
|
||||
#endif
|
||||
#endif /* FALL_THROUGH */
|
||||
|
Reference in New Issue
Block a user