jeyzu pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=81bcc14615b7437f1548cee415347bdfb22bbede

commit 81bcc14615b7437f1548cee415347bdfb22bbede
Author: Jérémy Zurcher <[email protected]>
Date:   Tue Jun 6 09:58:06 2017 +0200

    eina: fix clang compilation with EINA_FALLTHROUGH
    
    btw, using clang 4.0.0, I can't produce fallthrough warnings using
    -Weverything, -Wall or -Wimplicit-fallthrough
---
 src/lib/eina/eina_types.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_types.h b/src/lib/eina/eina_types.h
index 1fd7a1e26c..57a1339fad 100644
--- a/src/lib/eina/eina_types.h
+++ b/src/lib/eina/eina_types.h
@@ -196,14 +196,15 @@
 #  define EINA_UNLIKELY(exp)    __builtin_expect((exp), 0)
 #  define EINA_LIKELY(exp)      __builtin_expect((exp), 1)
 #  define EINA_SENTINEL __attribute__((__sentinel__))
-#  define EINA_FALLTHROUGH __attribute__ ((fallthrough));
 #  ifndef __clang__
+#   define EINA_FALLTHROUGH __attribute__ ((fallthrough));
 #   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)
 #   define EINA_PREFETCH_NOCACHE_WRITE(arg) (arg ? __builtin_prefetch(arg, 1, 
0) : (void) arg)
 #  else
 /* LLVM Clang workaround (crash on compilation) */
+#   define EINA_FALLTHROUGH
 #   define EINA_PREFETCH(arg) ((void) (arg))
 #   define EINA_PREFETCH_WRITE(arg) ((void) (arg))
 #   define EINA_PREFETCH_NOCACHE(arg) ((void) (arg))

-- 


Reply via email to