summaryrefslogtreecommitdiff
path: root/src/twm.h
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
commit16ed4f51c297ab20c62273fb16e5346ec72f01d7 (patch)
treec727e5fec8e680ae505ffec097eb06eac351b38d /src/twm.h
parentdd6121dd4d9218b29f1544d244c2622f6a502a18 (diff)
Replace GCC_PRINTFLIKE with _X_ATTRIBUTE_PRINTF
This silences all "function '...' might be a candidate for 'gnu_printf' format attribute" warnings. Signed-off-by: Tim Wiederhake <twied@gmx.net>
Diffstat (limited to 'src/twm.h')
-rw-r--r--src/twm.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/twm.h b/src/twm.h
index 8786ad2..517451a 100644
--- a/src/twm.h
+++ b/src/twm.h
@@ -74,14 +74,6 @@ from The Open Group.
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>
-#ifndef GCC_PRINTFLIKE
-#if defined(GCC_PRINTF) && !defined(printf)
-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
-#else
-#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
-#endif
-#endif
-
#ifndef GCC_NORETURN
#define GCC_NORETURN _X_NORETURN
#endif
@@ -402,10 +394,10 @@ NewBitmapCursor(Cursor *cp, char *source, char *mask);
extern Pixmap
CreateMenuIcon(int height, unsigned int *widthp, unsigned int *heightp);
-extern void twmError(const char *, ...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
-extern void twmWarning(const char *, ...) GCC_PRINTFLIKE(1,2);
-extern void twmVerbose(const char *, ...) GCC_PRINTFLIKE(1,2);
-extern void twmMessage(const char *, ...) GCC_PRINTFLIKE(1,2);
+extern void twmError(const char *, ...) _X_ATTRIBUTE_PRINTF(1,2) GCC_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);
extern Bool ErrorOccurred;
extern XErrorEvent LastErrorEvent;
@@ -416,7 +408,7 @@ extern Bool RestartPreviousState;
extern Bool
GetWMState(Window w, int *statep, Window *iwp);
-extern void parseWarning(const char *, ...) GCC_PRINTFLIKE(1,2);
+extern void parseWarning(const char *, ...) _X_ATTRIBUTE_PRINTF(1,2);
extern Atom TwmAtoms[];