From d3c1ede2480af93cc4cfefb8ba48798e6a4af8ea Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Mon, 1 Jan 2024 12:22:46 +0100 Subject: 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 --- src/events.h | 2 +- src/twm.h | 6 +----- 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 #include -#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); -- cgit v1.2.3