hw/xwin: printf format fixes in xevents.c

Window and Atom types derive from XID, which is always unsigned long in client
code, so use %ld format specifier

XTextProperty.nitems is of type unsigned long, so use %lu format specifier

ulReturnBytesLeft is of type unsigned long, so use %lu format specifier

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY 2015-02-06 20:48:26 +00:00
parent 98798fcf0d
commit 487f2595c9

View File

@ -107,7 +107,7 @@ MonitorSelection(XFixesSelectionNotifyEvent * e, unsigned int i)
/* Save new selection owner or None */
s_iOwners[i] = e->owner;
winDebug("MonitorSelection - %s - Now owned by XID %x\n",
winDebug("MonitorSelection - %s - Now owned by XID %lx\n",
szSelectionNames[i], e->owner);
}
@ -172,7 +172,7 @@ winClipboardSelectionNotifyTargets(HWND hwnd, Window iWindow, Display *pDisplay,
Atom atom = prop[i];
char *pszAtomName = XGetAtomName(pDisplay, atom);
data->targetList[i] = atom;
winDebug("winClipboardFlushXEvents - SelectionNotify - target[%d] %d = %s\n", i, atom, pszAtomName);
winDebug("winClipboardFlushXEvents - SelectionNotify - target[%d] %ld = %s\n", i, atom, pszAtomName);
XFree(pszAtomName);
}
@ -231,7 +231,7 @@ winClipboardFlushXEvents(HWND hwnd,
{
char *pszAtomName = NULL;
winDebug("SelectionRequest - target %d\n",
winDebug("SelectionRequest - target %ld\n",
event.xselectionrequest.target);
pszAtomName = XGetAtomName(pDisplay,
@ -561,7 +561,7 @@ winClipboardFlushXEvents(HWND hwnd,
*/
if (event.xselection.property == None) {
ErrorF("winClipboardFlushXEvents - SelectionNotify - "
"Conversion to format %d refused.\n",
"Conversion to format %ld refused.\n",
event.xselection.target);
return WIN_XEVENTS_FAILED;
}
@ -591,7 +591,7 @@ winClipboardFlushXEvents(HWND hwnd,
{
char *pszAtomName = NULL;
winDebug("SelectionNotify - returned data %d left %d\n",
winDebug("SelectionNotify - returned data %lu left %lu\n",
xtpText.nitems, ulReturnBytesLeft);
pszAtomName = XGetAtomName(pDisplay, xtpText.encoding);
winDebug("Notify atom name %s\n", pszAtomName);