Add JQ_FALLTHROUGH and use it to quiet warnings

This commit is contained in:
Nicolas Williams authored and Emanuele Torre committed 2023-07-30 04:25:54 +02:00
1 parent a6eb055c47
commit c8b30dff4a
4 files changed
+22 -2

No files matched your search

+7
View File
@@ -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,