billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=35cb66aa2bc9b81da68ce1b407062d831680f480

commit 35cb66aa2bc9b81da68ce1b407062d831680f480
Author: Boris Faure <bill...@gmail.com>
Date:   Sun Nov 12 00:30:25 2017 +0100

    handle -Wimplicit-fallthrough=
---
 src/bin/config.c |  4 +---
 src/bin/utils.h  | 12 ++++++++++++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/bin/config.c b/src/bin/config.c
index 9138066..60e5079 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -549,9 +549,6 @@ config_new(void)
    return config;
 }
 
-#ifndef EINA_FALLTHROUGH
-#define EINA_FALLTHROUGH
-#endif
 
 Config *
 config_load(const char *key)
@@ -654,6 +651,7 @@ config_load(const char *key)
                   /*pass through*/
                 case 16:
                   config->shine = 255;
+                  EINA_FALLTHROUGH;
                   /*pass through*/
                 case CONF_VER: /* 17 */
                   config->version = CONF_VER;
diff --git a/src/bin/utils.h b/src/bin/utils.h
index 688dd37..cf25322 100644
--- a/src/bin/utils.h
+++ b/src/bin/utils.h
@@ -19,4 +19,16 @@ Eina_Bool link_is_email(const char *str);
 #define casestartswith(str, constref) \
   (!strncasecmp(str, constref, sizeof(constref) - 1))
 
+#if (ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 20)
+#   if __GNUC__ >= 7
+#    define EINA_FALLTHROUGH __attribute__ ((fallthrough));
+#   else
+#    define EINA_FALLTHROUGH
+#   endif
+#else
+#  ifndef EINA_FALLTHROUGH
+#    define EINA_FALLTHROUGH
+#   endif
+#endif
+
 #endif

-- 


Reply via email to