From 487f2595c9dd9a5c3c600168a108963e87602561 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Fri, 6 Feb 2015 20:48:26 +0000 Subject: [PATCH] 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 Reviewed-by: Colin Harrison --- hw/xwin/winclipboard/xevents.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/xwin/winclipboard/xevents.c b/hw/xwin/winclipboard/xevents.c index 835195b52..bf44ac959 100644 --- a/hw/xwin/winclipboard/xevents.c +++ b/hw/xwin/winclipboard/xevents.c @@ -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);