summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-03 16:17:23 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-03 16:19:22 -0700
commit27c86946a7b300e38004757cb278ce455b855a0f (patch)
tree636e361a9a447c22c073e328684059f751471823
parent4f379b97f0d9aaa88eb5a9e0e959d1444a232eca (diff)
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 <alan.coopersmith@oracle.com>
-rw-r--r--Makefile.am1
-rw-r--r--xkbvleds.c2
2 files changed, 2 insertions, 1 deletions
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
};