From 21405f62ba6fe9e14db9b0e3b75b55e150614b2c Mon Sep 17 00:00:00 2001 From: walter harms Date: Tue, 26 Apr 2016 16:31:27 +0200 Subject: fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign] fix signess warning by casting Signed-off-by: walter harms --- nx-X11/lib/X11/ModMap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/lib/X11/ModMap.c') diff --git a/nx-X11/lib/X11/ModMap.c b/nx-X11/lib/X11/ModMap.c index 49a5d08e8..27f3a8d29 100644 --- a/nx-X11/lib/X11/ModMap.c +++ b/nx-X11/lib/X11/ModMap.c @@ -39,7 +39,7 @@ XGetModifierMapping(register Display *dpy) XModifierKeymap *res; LockDisplay(dpy); - GetEmptyReq(GetModifierMapping, req); + GetEmptyReq(GetModifierMapping, req); // Never used ? (void) _XReply (dpy, (xReply *)&rep, 0, xFalse); if (rep.length < (INT_MAX >> 2) && @@ -84,7 +84,7 @@ XSetModifierMapping( req->length += mapSize >> 2; req->numKeyPerModifier = modifier_map->max_keypermod; - Data(dpy, modifier_map->modifiermap, mapSize); + Data(dpy, (const char *)modifier_map->modifiermap, mapSize); (void) _XReply(dpy, (xReply *) & rep, (SIZEOF(xSetModifierMappingReply) - SIZEOF(xReply)) >> 2, xTrue); -- cgit v1.2.3 From ddc5ed4c9b876e2ae901edebcd59c9d77daeafd3 Mon Sep 17 00:00:00 2001 From: walter harms Date: Sat, 4 Jun 2016 17:19:59 +0200 Subject: Fixes: warning: variable 'req' set but not,used Fixes: warning: variable 'req' set but not used [-Wunused-but-set-variable] by marking req _X_UNUSED Solution was discussed on xorg-devel ML Peter Hutter, Alan Coopersmith Re: [PATCH libX11 3/5] fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign] Signed-off-by: harms wharms@bfs.de --- nx-X11/lib/X11/ModMap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/lib/X11/ModMap.c') diff --git a/nx-X11/lib/X11/ModMap.c b/nx-X11/lib/X11/ModMap.c index 27f3a8d29..ca15dde25 100644 --- a/nx-X11/lib/X11/ModMap.c +++ b/nx-X11/lib/X11/ModMap.c @@ -34,12 +34,12 @@ XModifierKeymap * XGetModifierMapping(register Display *dpy) { xGetModifierMappingReply rep; - register xReq *req; + _X_UNUSED register xReq *req; unsigned long nbytes; XModifierKeymap *res; LockDisplay(dpy); - GetEmptyReq(GetModifierMapping, req); // Never used ? + GetEmptyReq(GetModifierMapping, req); (void) _XReply (dpy, (xReply *)&rep, 0, xFalse); if (rep.length < (INT_MAX >> 2) && -- cgit v1.2.3