From: Christophe CURIS <[email protected]>

Signed-off-by: Christophe CURIS <[email protected]>
---
 src/event.c |    2 +-
 src/event.h |    8 +++++++-
 src/main.c  |    4 ++--
 src/main.h  |   10 ++++++++--
 4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/event.c b/src/event.c
index 7a1993c..c6951bb 100644
--- a/src/event.c
+++ b/src/event.c
@@ -387,7 +387,7 @@ static void handle_inotify_events(int fd, int wd)
  *      Calls inotifyGetEvents if defaults database changes.
  *----------------------------------------------------------------------
  */
-void EventLoop(void)
+noreturn void EventLoop(void)
 {
        XEvent event;
 #ifdef HAVE_INOTIFY
diff --git a/src/event.h b/src/event.h
index cfc245d..7208b6e 100644
--- a/src/event.h
+++ b/src/event.h
@@ -22,9 +22,15 @@
 #ifndef WMEVENT_H
 #define WMEVENT_H
 
+#include "config.h"
+
+#ifdef HAVE_STDNORETURN
+#include <stdnoreturn.h>
+#endif
+
 typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata);
 
-void EventLoop(void);
+noreturn void EventLoop(void);
 void DispatchEvent(XEvent *event);
 void ProcessPendingEvents(void);
 WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
diff --git a/src/main.c b/src/main.c
index a0c096e..5497e53 100644
--- a/src/main.c
+++ b/src/main.c
@@ -269,7 +269,7 @@ static int initWVisualID(const char *user_str)
        return 0;
 }
 
-void Exit(int status)
+noreturn void Exit(int status)
 {
        if (dpy)
                XCloseDisplay(dpy);
@@ -464,7 +464,7 @@ Bool RelaunchWindow(WWindow *wwin)
  *
  *----------------------------------------------------------------------
  */
-void wAbort(Bool dumpCore)
+noreturn void wAbort(Bool dumpCore)
 {
        int i;
        WScreen *scr;
diff --git a/src/main.h b/src/main.h
index 2198b74..585ea34 100644
--- a/src/main.h
+++ b/src/main.h
@@ -22,12 +22,18 @@
 #ifndef WMMAIN_H_
 #define WMMAIN_H_
 
-void Exit(int status) __attribute__((noreturn));
+#include "config.h"
+
+#ifdef HAVE_STDNORETURN
+#include <stdnoreturn.h>
+#endif
+
+noreturn void Exit(int status);
 void Restart(char *manager, Bool abortOnFailure);
 void SetupEnvironment(WScreen *scr);
 void ExecuteShellCommand(WScreen *scr, char *command);
 Bool RelaunchWindow(WWindow *wwin);
-void wAbort(Bool dumpCore);
+noreturn void wAbort(Bool dumpCore);
 void ExecExitScript(void);
 int getWVisualID(int screen);
 
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to