From e379927b2d1e24d4c637fe4161dbf3f2fd98e02b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 15 Oct 2022 10:42:54 -0700 Subject: Use _CONST_X_STRING to make libXt declare String as const char * Clears 22 out of 36 -Wdiscarded-qualifiers warnings from gcc Signed-off-by: Alan Coopersmith --- Makefile.am | 1 + xlogo.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index cf9924b..8ccf0ce 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,6 +21,7 @@ SUBDIRS = man bin_PROGRAMS = xlogo +AM_CPPFLAGS = -D_CONST_X_STRING AM_CFLAGS = $(XLOGO_CFLAGS) $(CWARNFLAGS) xlogo_LDADD = $(XLOGO_LIBS) diff --git a/xlogo.c b/xlogo.c index 10b4d5c..1c41f8b 100644 --- a/xlogo.c +++ b/xlogo.c @@ -117,7 +117,7 @@ Syntax(Widget toplevel) XtSetArg(arg, XtNconnection, &connection); XtGetValues(toplevel, &arg, (Cardinal)1); if (connection) - SmcCloseConnection(connection, n, reasons); + SmcCloseConnection(connection, n, (char **) reasons); else { for (i=0; i < n; i++) printf("%s", reasons[i]); -- cgit v1.2.3