summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2024-01-01 12:22:46 +0100
committerTim Wiederhake <twied@gmx.net>2024-01-01 12:22:46 +0100
commitd3c1ede2480af93cc4cfefb8ba48798e6a4af8ea (patch)
tree7dc99e035c4af179bbbaa9a8c82a03ccb51e064e
parent16ed4f51c297ab20c62273fb16e5346ec72f01d7 (diff)
Replace GCC_NORETURN with _X_NORETURN
This silences all "function might be candidate for attribute 'noreturn'" warnings. Add to HandleEvent as well, as that function never returns. Signed-off-by: Tim Wiederhake <twied@gmx.net>
-rw-r--r--src/events.h2
-rw-r--r--src/twm.h6
2 files changed, 2 insertions, 6 deletions
diff --git a/src/events.h b/src/events.h
index 3778488..cbe2d2d 100644
--- a/src/events.h
+++ b/src/events.h
@@ -76,7 +76,7 @@ extern Bool StashEventTime(XEvent *ev);
extern Window WindowOfEvent(XEvent *e);
extern Bool DispatchEvent2(void);
extern Bool DispatchEvent(void);
-extern void HandleEvents(void);
+extern void HandleEvents(void) _X_NORETURN;
extern void HandleColormapNotify(void);
extern void HandleVisibilityNotify(void);
extern void HandleKeyPress(void);
diff --git a/src/twm.h b/src/twm.h
index 517451a..2263685 100644
--- a/src/twm.h
+++ b/src/twm.h
@@ -74,10 +74,6 @@ from The Open Group.
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>
-#ifndef GCC_NORETURN
-#define GCC_NORETURN _X_NORETURN
-#endif
-
#ifndef WithdrawnState
#define WithdrawnState 0
#endif
@@ -394,7 +390,7 @@ NewBitmapCursor(Cursor *cp, char *source, char *mask);
extern Pixmap
CreateMenuIcon(int height, unsigned int *widthp, unsigned int *heightp);
-extern void twmError(const char *, ...) _X_ATTRIBUTE_PRINTF(1,2) GCC_NORETURN;
+extern void twmError(const char *, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN;
extern void twmWarning(const char *, ...) _X_ATTRIBUTE_PRINTF(1,2);
extern void twmVerbose(const char *, ...) _X_ATTRIBUTE_PRINTF(1,2);
extern void twmMessage(const char *, ...) _X_ATTRIBUTE_PRINTF(1,2);