From e021bc231fae81137226a74d16f13b8168fe670d Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 4 Mar 2017 00:28:01 +0100 Subject: xfixes: fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cursor.c: In function ‘TestForCursorName’: cursor.c:649:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] return (pCursor->name == (Atom) closure); ^ cursor.c: In function ‘ProcXFixesChangeCursorByName’: cursor.c:665:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ReplaceCursor (pSource, TestForCursorName, (void *) name); ^ Backport of commit 019ad5acd20e34dc2aa3b89cc426138db5164c48 Author: Eamon Walsh Date: Tue Feb 5 15:44:41 2008 -0500 XFixes: squash a pointer/integer size mismatch warning. --- nx-X11/programs/Xserver/xfixes/cursor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/xfixes/cursor.c b/nx-X11/programs/Xserver/xfixes/cursor.c index 4e87fdd4a..441c4d0b2 100644 --- a/nx-X11/programs/Xserver/xfixes/cursor.c +++ b/nx-X11/programs/Xserver/xfixes/cursor.c @@ -641,7 +641,8 @@ SProcXFixesChangeCursor (ClientPtr client) static Bool TestForCursorName (CursorPtr pCursor, void * closure) { - return (pCursor->name == (Atom) closure); + Atom *pName = closure; + return (pCursor->name == *pName); } int @@ -657,7 +658,7 @@ ProcXFixesChangeCursorByName (ClientPtr client) tchar = (char *) &stuff[1]; name = MakeAtom (tchar, stuff->nbytes, FALSE); if (name) - ReplaceCursor (pSource, TestForCursorName, (void *) name); + ReplaceCursor (pSource, TestForCursorName, &name); return (client->noClientException); } -- cgit v1.2.3