diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-04-08 01:28:36 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-07-23 23:59:44 +0100 |
commit | 43ac0491e36cdbb716b5c9d39c97d0aba3bebd75 (patch) | |
tree | bc502c44e380bd0a67746e88d114dc18f227e440 /hw | |
parent | e95bb97073ca77193e4c51bd1504403fbe245533 (diff) |
hw/xwin: Fix numerous 64-bit format/type cast issues with debug printing of pointers
Numerous pieces of debug output cast a pointer to an int and then use a "%08x"
printf format.
Use "%p" format for 64-bit portability.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xwin/winfillsp.c | 2 | ||||
-rw-r--r-- | hw/xwin/winscrinit.c | 2 | ||||
-rw-r--r-- | hw/xwin/winwin32rootless.c | 44 | ||||
-rw-r--r-- | hw/xwin/winwin32rootlesswindow.c | 4 | ||||
-rw-r--r-- | hw/xwin/winwin32rootlesswndproc.c | 14 | ||||
-rw-r--r-- | hw/xwin/winwindowswm.c | 6 |
6 files changed, 36 insertions, 36 deletions
diff --git a/hw/xwin/winfillsp.c b/hw/xwin/winfillsp.c index f2432ed23..bd0a15e8a 100644 --- a/hw/xwin/winfillsp.c +++ b/hw/xwin/winfillsp.c @@ -118,7 +118,7 @@ winFillSpansNativeGDI(DrawablePtr pDrawable, if (hbmpOrig == NULL) FatalError("winFillSpans - DRAWABLE_PIXMAP - " "SelectObject () failed on\n\tpPixmapPriv->hBitmap: " - "%08x\n", (unsigned int) pPixmapPriv->hBitmap); + "%p\n", pPixmapPriv->hBitmap); /* Branch on the fill type */ switch (pGC->fillStyle) { diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 5623b8881..23152cbd2 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -703,7 +703,7 @@ winFinishScreenInitNativeGDI(int i, pScreenPriv->fEnabled = TRUE; ErrorF("winFinishScreenInitNativeGDI - Successful addition of " - "screen %08x\n", (unsigned int) pScreen); + "screen %p\n", pScreen); return TRUE; } diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c index 210fea3fa..724976a84 100644 --- a/hw/xwin/winwin32rootless.c +++ b/hw/xwin/winwin32rootless.c @@ -312,8 +312,8 @@ winMWExtWMCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, } #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMCreateFrame - (%08x) %08x\n", - (int) pFrame->wid, (int) pRLWinPriv->hWnd); + winDebug("winMWExtWMCreateFrame - (%p) %p\n", + pFrame->wid, pRLWinPriv->hWnd); #if 0 { WindowPtr pWin2 = NULL; @@ -350,8 +350,8 @@ winMWExtWMDestroyFrame(RootlessFrameID wid) char pszClass[CLASS_NAME_LENGTH]; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMDestroyFrame (%08x) %08x\n", - (int) pRLWinPriv, (int) pRLWinPriv->hWnd); + winDebug("winMWExtWMDestroyFrame (%p) %p\n", + pRLWinPriv, pRLWinPriv->hWnd); #if 0 { WindowPtr pWin2 = NULL; @@ -416,7 +416,7 @@ winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX, int iX, iY, iWidth, iHeight; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMMoveFrame (%08x) (%d %d)\n", (int) pRLWinPriv, iNewX, + winDebug("winMWExtWMMoveFrame (%p) (%d %d)\n", pRLWinPriv, iNewX, iNewY); #endif @@ -456,7 +456,7 @@ winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER); g_fNoConfigureWindow = FALSE; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMMoveFrame (%08x) done\n", (int) pRLWinPriv); + winDebug("winMWExtWMMoveFrame (%p) done\n", pRLWinPriv); #endif } @@ -474,8 +474,8 @@ winMWExtWMResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, int iX, iY; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMResizeFrame (%08x) (%d %d)-(%d %d)\n", - (int) pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight); + winDebug("winMWExtWMResizeFrame (%p) (%d %d)-(%d %d)\n", + pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight); #endif pRLWinPriv->fResized = TRUE; @@ -526,7 +526,7 @@ winMWExtWMRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) Bool fNeedRestack = TRUE; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMRestackFrame (%08x)\n", (int) pRLWinPriv); + winDebug("winMWExtWMRestackFrame (%p)\n", pRLWinPriv); #endif if (pScreenPriv && pScreenPriv->fRestacking) @@ -612,7 +612,7 @@ winMWExtWMRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); } #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMRestackFrame - done (%08x)\n", (int) pRLWinPriv); + winDebug("winMWExtWMRestackFrame - done (%p)\n", pRLWinPriv); #endif pRLWinPriv->fRestackingNow = FALSE; @@ -626,7 +626,7 @@ winMWExtWMReshapeFrame(RootlessFrameID wid, RegionPtr pShape) RECT rcWindow, rcClient; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMReshapeFrame (%08x)\n", (int) pRLWinPriv); + winDebug("winMWExtWMReshapeFrame (%p)\n", pRLWinPriv); #endif hRgn = winMWExtWMCreateRgnFromRegion(pShape); @@ -655,7 +655,7 @@ winMWExtWMUnmapFrame(RootlessFrameID wid) win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMUnmapFrame (%08x)\n", (int) pRLWinPriv); + winDebug("winMWExtWMUnmapFrame (%p)\n", pRLWinPriv); #endif g_fNoConfigureWindow = TRUE; @@ -680,7 +680,7 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) HBITMAP hbmpNew; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMStartDrawing (%08x) %08x\n", (int) pRLWinPriv, + winDebug("winMWExtWMStartDrawing (%p) %08x\n", pRLWinPriv, pRLWinPriv->fDestroyed); #endif @@ -692,8 +692,8 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) pScreenInfo = pScreenPriv->pScreenInfo; #if CYGMULTIWINDOW_DEBUG - winDebug("\tpScreenPriv %08X\n", (int) pScreenPriv); - winDebug("\tpScreenInfo %08X\n", (int) pScreenInfo); + winDebug("\tpScreenPriv %p\n", pScreenPriv); + winDebug("\tpScreenInfo %p\n", pScreenInfo); winDebug("\t(%d, %d)\n", (int) pRLWinPriv->pFrame->width, (int) pRLWinPriv->pFrame->height); #endif @@ -808,9 +808,9 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) ErrorF("winMWExtWMStartDrawing - Already window was destroyed \n"); } #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMStartDrawing - done (0x%08x) 0x%08x %d\n", - (int) pRLWinPriv, - (unsigned int) pRLWinPriv->pfb, + winDebug("winMWExtWMStartDrawing - done (%p) %p %d\n", + pRLWinPriv, + pRLWinPriv->pfb, (unsigned int) pRLWinPriv->dwWidthBytes); #endif *pixelData = pRLWinPriv->pfb; @@ -924,8 +924,8 @@ winMWExtWMRootlessSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin) win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) pFrame->wid; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMRootlessSwitchWindow (%08x) %08x\n", - (int) pRLWinPriv, (int) pRLWinPriv->hWnd); + winDebug("winMWExtWMRootlessSwitchWindow (%p) %p\n", + pRLWinPriv, pRLWinPriv->hWnd); #endif pRLWinPriv->pFrame = pFrame; pRLWinPriv->fResized = TRUE; @@ -979,8 +979,8 @@ winMWExtWMCopyWindow(RootlessFrameID wid, int nDstRects, RECT rcDmg; #if CYGMULTIWINDOW_DEBUG - winDebug("winMWExtWMCopyWindow (%08x, %d, %08x, %d, %d)\n", - (int) pRLWinPriv, nDstRects, (int) pDstRects, nDx, nDy); + winDebug("winMWExtWMCopyWindow (%p, %d, %p, %d, %d)\n", + pRLWinPriv, nDstRects, pDstRects, nDx, nDy); #endif for (pEnd = pDstRects + nDstRects; pDstRects < pEnd; pDstRects++) { diff --git a/hw/xwin/winwin32rootlesswindow.c b/hw/xwin/winwin32rootlesswindow.c index ce615e692..1faa531df 100644 --- a/hw/xwin/winwin32rootlesswindow.c +++ b/hw/xwin/winwin32rootlesswindow.c @@ -213,8 +213,8 @@ winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv, showCmd |= SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER; - winDebug("winMWExtWMUpdateWindowDecoration %08x %s\n", - (int) pRLWinPriv, fDecorate ? "Decorate" : "Bare"); + winDebug("winMWExtWMUpdateWindowDecoration %p %s\n", + pRLWinPriv, fDecorate ? "Decorate" : "Bare"); /* Get the extended window style information */ dwExStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE); diff --git a/hw/xwin/winwin32rootlesswndproc.c b/hw/xwin/winwin32rootlesswndproc.c index be2958338..001d0d2fc 100644 --- a/hw/xwin/winwin32rootlesswndproc.c +++ b/hw/xwin/winwin32rootlesswndproc.c @@ -832,24 +832,24 @@ winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (!(pWinPos->flags & SWP_NOZORDER)) { if (pRLWinPriv->fRestackingNow || pScreenPriv->fRestacking) { #if CYGMULTIWINDOW_DEBUG - winDebug("Win %08x is now restacking.\n", - (unsigned int) pRLWinPriv); + winDebug("Win %p is now restacking.\n", + pRLWinPriv); #endif break; } if (winIsInternalWMRunning(pScreenInfo) || IsRaiseOnClick(pWin)) { #if CYGMULTIWINDOW_DEBUG - winDebug("Win %08x has WINDOWSWM_RAISE_ON_CLICK.\n", - (unsigned int) pRLWinPriv); + winDebug("Win %p has WINDOWSWM_RAISE_ON_CLICK.\n", + pRLWinPriv); #endif break; } #if CYGMULTIWINDOW_DEBUG - winDebug("Win %08x forbid to change z order (%08x).\n", - (unsigned int) pRLWinPriv, - (unsigned int) pWinPos->hwndInsertAfter); + winDebug("Win %p forbid to change z order (%p).\n", + pRLWinPriv, + pWinPos->hwndInsertAfter); #endif pWinPos->flags |= SWP_NOZORDER; } diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index 6e9d63c53..be43265e0 100644 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -246,7 +246,7 @@ winWindowsWMSendEvent(int type, unsigned int mask, int which, int arg, for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { client = pEvent->client; #if CYGMULTIWINDOW_DEBUG - ErrorF("winWindowsWMSendEvent - x%08x\n", (int) client); + ErrorF("winWindowsWMSendEvent - %p\n", client); #endif if ((pEvent->mask & mask) == 0) { continue; @@ -381,8 +381,8 @@ ProcWindowsWMFrameDraw(ClientPtr client) return BadWindow; #if CYGMULTIWINDOW_DEBUG - ErrorF("ProcWindowsWMFrameDraw - HWND 0x%08x 0x%08x 0x%08x\n", - (int) pRLWinPriv->hWnd, (int) stuff->frame_style, + ErrorF("ProcWindowsWMFrameDraw - HWND %p 0x%08x 0x%08x\n", + pRLWinPriv->hWnd, (int) stuff->frame_style, (int) stuff->frame_style_ex); ErrorF("ProcWindowsWMFrameDraw - %d %d %d %d\n", stuff->ix, stuff->iy, stuff->iw, stuff->ih); |