Commit e021bc23 authored by Ulrich Sibiller's avatar Ulrich Sibiller

xfixes: fix compiler warning

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 <ewalsh@tycho.nsa.gov> Date: Tue Feb 5 15:44:41 2008 -0500 XFixes: squash a pointer/integer size mismatch warning.
parent 914f78a2
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment