From 1aa2b6de14ebe20c53d49274c64ebc2a84b4e5c7 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 6 Jun 2017 09:57:14 -0700 Subject: [PATCH] eina: enable fallthrough warning suppression only on GCC 7 and above. --- src/lib/eina/eina_types.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/eina/eina_types.h b/src/lib/eina/eina_types.h index 57a1339fad..4c272fd682 100644 --- a/src/lib/eina/eina_types.h +++ b/src/lib/eina/eina_types.h @@ -197,7 +197,11 @@ # define EINA_LIKELY(exp) __builtin_expect((exp), 1) # define EINA_SENTINEL __attribute__((__sentinel__)) # ifndef __clang__ -# define EINA_FALLTHROUGH __attribute__ ((fallthrough)); +# if __GNUC__ >= 7 +# define EINA_FALLTHROUGH __attribute__ ((fallthrough)); +# else +# define EINA_FALLTHROUGH +# endif # define EINA_PREFETCH(arg) (arg ? __builtin_prefetch(arg) : (void) arg) # define EINA_PREFETCH_WRITE(arg) (arg ? __builtin_prefetch(arg, 1) : (void) arg) # define EINA_PREFETCH_NOCACHE(arg) (arg ? __builtin_prefetch(arg, 0, 0) : (void) arg)