mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +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
|
#ifndef FALL_THROUGH
|
||||||
/* GCC 7 has new switch() fall-through detection */
|
/* GCC 7 has new switch() fall-through detection */
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#if ((__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 1)))
|
#if defined(fallthrough)
|
||||||
#if defined(WOLFSSL_LINUXKM) && defined(fallthrough)
|
|
||||||
#define FALL_THROUGH fallthrough
|
#define FALL_THROUGH fallthrough
|
||||||
#else
|
#elif ((__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 1)))
|
||||||
/* Use __ notation to avoid conflicts */
|
#define FALL_THROUGH ; __attribute__ ((fallthrough))
|
||||||
#define FALL_THROUGH ; __attribute__ ((__fallthrough__))
|
#elif defined(__clang__) && defined(__clang_major__) &&
|
||||||
#endif
|
(__clang_major__ >= 4)
|
||||||
|
#define FALL_THROUGH ; __attribute__ ((fallthrough))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif /* FALL_THROUGH */
|
#endif /* FALL_THROUGH */
|
||||||
|
Reference in New Issue
Block a user