From 5e0584c43d3511a5544246a0f82c759ce860a0c2 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 15 Feb 2013 23:34:40 -0800 Subject: Preserve constness in casting arguments through the Data*() routines Casts were annoying gcc by dropping constness when changing types, when routines simply either copy data into the request buffer or send it directly to the X server, and never modify the input. Fixes gcc warnings including: ChProp.c: In function 'XChangeProperty': ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] ChProp.c:83:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] SetHints.c: In function 'XSetStandardProperties': SetHints.c:262:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] SetPntMap.c: In function 'XSetPointerMapping': SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] StBytes.c: In function 'XStoreBuffer': StBytes.c:97:33: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] StName.c: In function 'XStoreName': StName.c:40:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] StName.c: In function 'XSetIconName': StName.c:51:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/SetPntMap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/lib/X11/SetPntMap.c') diff --git a/nx-X11/lib/X11/SetPntMap.c b/nx-X11/lib/X11/SetPntMap.c index 45571ada0..5dd9beef8 100644 --- a/nx-X11/lib/X11/SetPntMap.c +++ b/nx-X11/lib/X11/SetPntMap.c @@ -43,7 +43,7 @@ XSetPointerMapping ( GetReq (SetPointerMapping, req); req->nElts = nmaps; req->length += (nmaps + 3)>>2; - Data (dpy, (char *)map, (long) nmaps); + Data (dpy, (_Xconst char *)map, (long) nmaps); if (_XReply (dpy, (xReply *)&rep, 0, xFalse) == 0) rep.success = MappingSuccess; UnlockDisplay(dpy); -- cgit v1.2.3 From e2e45b2b3abf46e4e5c27d7c655769f2b693446e Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 7 Oct 2016 23:46:05 +0200 Subject: Align files with upstream libX11-1.6.0 This commit looks a bit crazy at first glance. It (re-)introduces lots of whitespaces and bad formatting. Explanation: Backporting upstream changes lead to commits being applied out of order. This meant a lot of manual intervention which in turn lead to slight differences between upstream and NX. With this commit these slight differences are minimized which will be of great help when adding further upstream patches. --- nx-X11/lib/X11/SetPntMap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'nx-X11/lib/X11/SetPntMap.c') diff --git a/nx-X11/lib/X11/SetPntMap.c b/nx-X11/lib/X11/SetPntMap.c index 5dd9beef8..14e104d6d 100644 --- a/nx-X11/lib/X11/SetPntMap.c +++ b/nx-X11/lib/X11/SetPntMap.c @@ -74,3 +74,4 @@ XChangeKeyboardMapping ( SyncHandle(); return 0; } + -- cgit v1.2.3