summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-09-13 16:11:14 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-09-13 16:11:14 -0700
commitd35c1ce67641e9b6ab2c329570a8270b5c73d255 (patch)
tree1324d743bdef4004965df79d55e777f9ff1e5217
parent1d85b2960cd4bf761cc359db61f2727f19b1560c (diff)
downloadxorg-lib-libXmu-d35c1ce67641e9b6ab2c329570a8270b5c73d255.tar.gz
Use _CONST_X_STRING to make libXt declare String as const char *
Clears 11 out of 58 -Wdiscarded-qualifiers warnings from gcc Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/CvtStdSel.c2
-rw-r--r--src/EditresCom.c2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/WidgetNode.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/CvtStdSel.c b/src/CvtStdSel.c
index ac370b4..8a1b05d 100644
--- a/src/CvtStdSel.c
+++ b/src/CvtStdSel.c
@@ -206,7 +206,7 @@ XmuConvertStandardSelection(Widget w, Time time, Atom *selection, Atom *target,
}
if (*target == XA_CLASS(d)) {
Widget parent = XtParent(w);
- char *class;
+ String class;
int len;
while (parent != NULL && !isApplicationShell(w)) {
w = parent;
diff --git a/src/EditresCom.c b/src/EditresCom.c
index 07c0d47..2303833 100644
--- a/src/EditresCom.c
+++ b/src/EditresCom.c
@@ -1148,7 +1148,7 @@ DumpChildren(Widget w, ProtocolStream *stream, unsigned short *count)
int i, num_children;
Widget *children;
unsigned long window;
- char *c_class;
+ String c_class;
(*count)++;
diff --git a/src/Makefile.am b/src/Makefile.am
index a08a8bb..b0652f7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,7 @@ BITMAP_DEFINES = -DBITMAPDIR=\"$(includedir)/X11/bitmaps\"
AM_CPPFLAGS = \
-I${top_srcdir}/include \
-I${top_srcdir}/include/X11/Xmu \
- $(BITMAP_DEFINES) -D_BSD_SOURCE
+ $(BITMAP_DEFINES) -D_CONST_X_STRING -D_BSD_SOURCE
AM_CFLAGS = $(CWARNFLAGS) $(XMU_CFLAGS)
diff --git a/src/WidgetNode.c b/src/WidgetNode.c
index 5c4fcc8..7a91723 100644
--- a/src/WidgetNode.c
+++ b/src/WidgetNode.c
@@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group.
static char *binsearch(char*, char*, int, int,
int (*__compar)(_Xconst void*, _Xconst void*));
static int compare_resource_entries(_Xconst void *a, _Xconst void *b);
-static XmuWidgetNode *find_resource(XmuWidgetNode*, char*, Bool);
+static XmuWidgetNode *find_resource(XmuWidgetNode*, _Xconst char*, Bool);
static void mark_resource_owner(XmuWidgetNode*);
/*
* Implementation
@@ -92,7 +92,7 @@ compare_resource_entries(register _Xconst void *a,
static XmuWidgetNode *
-find_resource(XmuWidgetNode *node, char *name, Bool cons)
+find_resource(XmuWidgetNode *node, _Xconst char *name, Bool cons)
{
register XmuWidgetNode *sup;
XtResource res;