Fix fallthrough warnings
[src/app-framework-binder.git] / src / main.c
index a989a70..dee79d8 100644 (file)
 #include <sys/stat.h>
 #include <sys/wait.h>
 
+#if !defined(NO_CALL_PERSONALITY)
+#include <sys/personality.h>
+#endif
+
 #include <json-c/json.h>
 
 #include <systemd/sd-daemon.h>
@@ -347,7 +351,7 @@ static char *instanciate_string(char *arg, const char *port, const char *token)
                switch(*++it) {
                case 'p': wr = stpcpy(wr, port); break;
                case 't': wr = stpcpy(wr, token); break;
-               default: *wr++ = SUBST_CHAR;
+               default: *wr++ = SUBST_CHAR; /*@fallthrough@*/
                case SUBST_CHAR: *wr++ = *it;
                }
                arg = ++it;
@@ -598,6 +602,9 @@ static void start(int signum)
 
        /* start the services */
        afb_debug("start-start");
+#if !defined(NO_CALL_PERSONALITY)
+       personality((unsigned long)-1L);
+#endif
        if (afb_apiset_start_all_services(main_apiset, 1) < 0)
                goto error;