From a752fdad02f5eba89c53a53e4a212cf31cbf4670 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Wed, 27 Dec 2023 23:08:57 +0100 Subject: Fix include guard names Names that begin with an underscore ('_') are reserved. Follow the usual practice of naming the include guard of file "foo.h" "FOO_H", as is already done in "icons.h". Signed-off-by: Tim Wiederhake --- src/events.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/events.h') diff --git a/src/events.h b/src/events.h index 085439f..3778488 100644 --- a/src/events.h +++ b/src/events.h @@ -57,8 +57,8 @@ in this Software without prior written authorization from The Open Group. * ***********************************************************************/ -#ifndef _EVENTS_ -#define _EVENTS_ +#ifndef EVENTS_H +#define EVENTS_H #include "screen.h" #include "twm.h" @@ -127,4 +127,4 @@ extern unsigned int mods_used; extern int MovedFromKeyPress; -#endif /* _EVENTS_ */ +#endif /* EVENTS_H */ -- cgit v1.2.3 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/events.h') 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); -- cgit v1.2.3 From cf9a35db8381f9b809465306aec3bcfe3bc1dc0d Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Sat, 20 Jan 2024 16:07:00 +0100 Subject: Make appContext a local variable Signed-off-by: Tim Wiederhake --- src/events.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/events.h') diff --git a/src/events.h b/src/events.h index cbe2d2d..8e3b806 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) _X_NORETURN; +extern void HandleEvents(XtAppContext) _X_NORETURN; extern void HandleColormapNotify(void); extern void HandleVisibilityNotify(void); extern void HandleKeyPress(void); -- cgit v1.2.3