Add JQ_FALLTHROUGH and use it to quiet warnings
This commit is contained in:
1 parent
a6eb055c47
commit
c8b30dff4a
4 files changed
+22
-2
No files matched your search
@@ -5,6 +5,13 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if (defined(__GNUC__) && __GNUC__ >= 7) || \
|
||||
(defined(__clang__) && __clang_major__ >= 10)
|
||||
# define JQ_FALLTHROUGH __attribute__((fallthrough))
|
||||
#else
|
||||
# define JQ_FALLTHROUGH do {} while (0) /* fallthrough */
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
JV_KIND_INVALID,
|
||||
JV_KIND_NULL,
|
||||
|
||||
Reference in new issue
Block a user