From 27c86946a7b300e38004757cb278ce455b855a0f Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 3 Apr 2022 16:17:23 -0700 Subject: [PATCH] Use _CONST_X_STRING to make libXt declare String as const char * Clears 38 out of 58 -Wdiscarded-qualifiers warnings from gcc Signed-off-by: Alan Coopersmith --- Makefile.am | 1 + xkbvleds.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 3291901..32a5468 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,7 @@ SUBDIRS = man bin_PROGRAMS = xkbvleds xkbwatch xkbbell AM_CFLAGS = $(CWARNFLAGS) +AM_CPPFLAGS = -D_CONST_X_STRING # xkbvleds diff --git a/xkbvleds.c b/xkbvleds.c index 3151ed8..7d59fba 100644 --- a/xkbvleds.c +++ b/xkbvleds.c @@ -210,7 +210,7 @@ main(int argc, char *argv[]) static Arg boxArgs[] = { {XtNorientation, (XtArgVal) XtorientHorizontal} }; static Arg onArgs[] = { {XtNon, (XtArgVal) True} }; static Arg offArgs[] = { {XtNon, (XtArgVal) False} }; - static char *fallback_resources[] = { + static String fallback_resources[] = { "*Box*background: grey40", NULL }; -- GitLab