From 73e835828184af9230db2176579a4ff74da7785b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 1 Jun 2019 18:33:51 -0700 Subject: Use _CONST_X_STRING to make libXt declare String as const char * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clears gcc 7.3 warnings of: appres.c: In function ‘main’: appres.c:36:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] #define NONAME "-AppResTest-" ^ appres.c:126:20: note: in expansion of macro ‘NONAME’ String iname = NONAME, cname = NONAME; ^~~~~~ appres.c:36:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] #define NONAME "-AppResTest-" ^ appres.c:126:36: note: in expansion of macro ‘NONAME’ String iname = NONAME, cname = NONAME; ^~~~~~ Signed-off-by: Alan Coopersmith --- appres.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'appres.c') diff --git a/appres.c b/appres.c index fad870f..e546ac0 100644 --- a/appres.c +++ b/appres.c @@ -29,6 +29,8 @@ in this Software without prior written authorization from The Open Group. # include "config.h" #endif +#define _CONST_X_STRING + #include #include #include @@ -123,7 +125,7 @@ int main (int argc, char *argv[]) { Widget toplevel; - char *iname = NONAME, *cname = NONAME; + String iname = NONAME, cname = NONAME; XtAppContext xtcontext; XrmName names[101]; XrmClass classes[101]; -- cgit v1.2.3