aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/edje
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-04 10:10:12 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-04 10:19:27 +0900
commit932ae95a4e537916fe66952bdadf8928b7c4661e (patch)
treea0df1efb21d208839cf15f5f29e7d9cf0c6537ff /src/bin/edje
parentconfigure: switch to dev mode again (diff)
downloadefl-932ae95a4e537916fe66952bdadf8928b7c4661e.tar.gz
efl src - mark fallthrough switch statements in 3rd party code
in code we importend that doesnt use eina we have warnings of fallthroughs. all o them are commented to be fallthrough so add the attribute there too to have fewer warnings.
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/epp/cpplib.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/bin/edje/epp/cpplib.c b/src/bin/edje/epp/cpplib.c
index 48c19694b2..c901a1e0ff 100644
--- a/src/bin/edje/epp/cpplib.c
+++ b/src/bin/edje/epp/cpplib.c
@@ -3136,7 +3136,13 @@ get_directive_token(cpp_reader * pfile)
case CPP_POP:
if (!CPP_IS_MACRO_BUFFER(CPP_BUFFER(pfile)))
return token;
- /* ... else fall though ... */
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+#if __has_attribute(fallthrough)
+ __attribute__((fallthrough));
+#endif
+ /* ... else fall though ... */
case CPP_HSPACE:
case CPP_COMMENT:
CPP_SET_WRITTEN(pfile, old_written);
@@ -4300,6 +4306,12 @@ skip_if_group(cpp_reader * pfile, int any)
validate_else(pfile,
kt->type ==
T_ELSE ? "#else" : "#endif");
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+#if __has_attribute(fallthrough)
+ __attribute__((fallthrough));
+#endif
/* this fall through is intened */
case T_ELIF:
if (pfile->if_stack == CPP_BUFFER(pfile)->if_stack)
@@ -6748,7 +6760,14 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv)
{
opts->out_fname = "";
break;
- } /* else fall through into error */
+ }
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+#if __has_attribute(fallthrough)
+ __attribute__((fallthrough));
+#endif
+ /* else fall through into error */
default:
return i;
}