hw/xwin: printf format fixes for XID type

XID inside the server has type unsigned int (x86_64) or unsigned long (x86)

Follow the example of the rest of the server and cast to unsigned int and use
a %u or %x format.

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-06-29 14:25:49 +01:00
parent dcb797b31f
commit ba468e003e
3 changed files with 15 additions and 12 deletions

View File

@ -21,7 +21,7 @@ void
HWND
winGetWindowInfo(WindowPtr pWin)
{
winTrace("%s: pWin %p XID 0x%x\n", __FUNCTION__, pWin, pWin->drawable.id);
winTrace("%s: pWin %p XID 0x%x\n", __FUNCTION__, pWin, (unsigned int)pWin->drawable.id);
/* a real window was requested */
if (pWin != NULL) {

View File

@ -449,8 +449,9 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize)
hints = XGetWMHints(pDisplay, id);
if (hints) {
winDebug("winXIconToHICON: id 0x%x icon_pixmap hint %x\n", id,
hints->icon_pixmap);
winDebug("winXIconToHICON: id 0x%x icon_pixmap hint 0x%x\n",
(unsigned int)id,
(unsigned int)hints->icon_pixmap);
if (hints->icon_pixmap) {
Window root;
@ -465,8 +466,8 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize)
xImageIcon =
XGetImage(pDisplay, hints->icon_pixmap, 0, 0, width, height,
0xFFFFFFFF, ZPixmap);
winDebug("winXIconToHICON: id 0x%x icon Ximage 0x%p\n", id,
xImageIcon);
winDebug("winXIconToHICON: id 0x%x icon Ximage 0x%p\n",
(unsigned int)id, xImageIcon);
if (hints->icon_mask)
xImageMask =

View File

@ -379,8 +379,9 @@ winReparentWindowMultiWindow(WindowPtr pWin, WindowPtr pPriorParent)
winDebug
("winReparentMultiWindow - pWin:%p XID:0x%x, reparent from pWin:%p XID:0x%x to pWin:%p XID:0x%x\n",
pWin, pWin->drawable.id, pPriorParent, pPriorParent->drawable.id,
pWin->parent, pWin->parent->drawable.id);
pWin, (unsigned int)pWin->drawable.id,
pPriorParent, (unsigned int)pPriorParent->drawable.id,
pWin->parent, (unsigned int)pWin->parent->drawable.id);
WIN_UNWRAP(ReparentWindow);
if (pScreen->ReparentWindow)
@ -493,7 +494,7 @@ winCreateWindowsWindow(WindowPtr pWin)
winInitMultiWindowClass();
winDebug("winCreateWindowsTopLevelWindow - pWin:%p XID:0x%x \n", pWin,
pWin->drawable.id);
(unsigned int)pWin->drawable.id);
iX = pWin->drawable.x + GetSystemMetrics(SM_XVIRTUALSCREEN);
iY = pWin->drawable.y + GetSystemMetrics(SM_YVIRTUALSCREEN);
@ -619,7 +620,7 @@ winDestroyWindowsWindow(WindowPtr pWin)
HICON hIconSm;
winDebug("winDestroyWindowsWindow - pWin:%p XID:0x%x \n", pWin,
pWin->drawable.id);
(unsigned int)pWin->drawable.id);
/* Bail out if the Windows window handle is invalid */
if (pWinPriv->hWnd == NULL)
@ -713,7 +714,7 @@ winGetWindowID(WindowPtr pWin)
FindClientResourcesByType(c, RT_WINDOW, winFindWindow, &wi);
#if CYGMULTIWINDOW_DEBUG
ErrorF("winGetWindowID - Window ID: %d\n", wi.id);
ErrorF("winGetWindowID - Window ID: %u\n", (unsigned int)wi.id);
#endif
return wi.id;
@ -993,8 +994,9 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd)
vlist[2] = pDraw->width + dW;
vlist[3] = pDraw->height + dH;
#if CYGWINDOWING_DEBUG
ErrorF("\tConfigureWindow to (%ld, %ld) - %ldx%ld\n", vlist[0], vlist[1],
vlist[2], vlist[3]);
ErrorF("\tConfigureWindow to (%u, %u) - %ux%u\n",
(unsigned int)vlist[0], (unsigned int)vlist[1],
(unsigned int)vlist[2], (unsigned int)vlist[3]);
#endif
return ConfigureWindow(pWin, CWX | CWY | CWWidth | CWHeight,
vlist, wClient(pWin));