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>
This commit is contained in:
parent
e95bb97073
commit
43ac0491e3
|
@ -118,7 +118,7 @@ winFillSpansNativeGDI(DrawablePtr pDrawable,
|
||||||
if (hbmpOrig == NULL)
|
if (hbmpOrig == NULL)
|
||||||
FatalError("winFillSpans - DRAWABLE_PIXMAP - "
|
FatalError("winFillSpans - DRAWABLE_PIXMAP - "
|
||||||
"SelectObject () failed on\n\tpPixmapPriv->hBitmap: "
|
"SelectObject () failed on\n\tpPixmapPriv->hBitmap: "
|
||||||
"%08x\n", (unsigned int) pPixmapPriv->hBitmap);
|
"%p\n", pPixmapPriv->hBitmap);
|
||||||
|
|
||||||
/* Branch on the fill type */
|
/* Branch on the fill type */
|
||||||
switch (pGC->fillStyle) {
|
switch (pGC->fillStyle) {
|
||||||
|
|
|
@ -703,7 +703,7 @@ winFinishScreenInitNativeGDI(int i,
|
||||||
pScreenPriv->fEnabled = TRUE;
|
pScreenPriv->fEnabled = TRUE;
|
||||||
|
|
||||||
ErrorF("winFinishScreenInitNativeGDI - Successful addition of "
|
ErrorF("winFinishScreenInitNativeGDI - Successful addition of "
|
||||||
"screen %08x\n", (unsigned int) pScreen);
|
"screen %p\n", pScreen);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,8 +312,8 @@ winMWExtWMCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMCreateFrame - (%08x) %08x\n",
|
winDebug("winMWExtWMCreateFrame - (%p) %p\n",
|
||||||
(int) pFrame->wid, (int) pRLWinPriv->hWnd);
|
pFrame->wid, pRLWinPriv->hWnd);
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
WindowPtr pWin2 = NULL;
|
WindowPtr pWin2 = NULL;
|
||||||
|
@ -350,8 +350,8 @@ winMWExtWMDestroyFrame(RootlessFrameID wid)
|
||||||
char pszClass[CLASS_NAME_LENGTH];
|
char pszClass[CLASS_NAME_LENGTH];
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMDestroyFrame (%08x) %08x\n",
|
winDebug("winMWExtWMDestroyFrame (%p) %p\n",
|
||||||
(int) pRLWinPriv, (int) pRLWinPriv->hWnd);
|
pRLWinPriv, pRLWinPriv->hWnd);
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
WindowPtr pWin2 = NULL;
|
WindowPtr pWin2 = NULL;
|
||||||
|
@ -416,7 +416,7 @@ winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX,
|
||||||
int iX, iY, iWidth, iHeight;
|
int iX, iY, iWidth, iHeight;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMMoveFrame (%08x) (%d %d)\n", (int) pRLWinPriv, iNewX,
|
winDebug("winMWExtWMMoveFrame (%p) (%d %d)\n", pRLWinPriv, iNewX,
|
||||||
iNewY);
|
iNewY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -456,7 +456,7 @@ winMWExtWMMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int iNewX,
|
||||||
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
|
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
|
||||||
g_fNoConfigureWindow = FALSE;
|
g_fNoConfigureWindow = FALSE;
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMMoveFrame (%08x) done\n", (int) pRLWinPriv);
|
winDebug("winMWExtWMMoveFrame (%p) done\n", pRLWinPriv);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,8 +474,8 @@ winMWExtWMResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
|
||||||
int iX, iY;
|
int iX, iY;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMResizeFrame (%08x) (%d %d)-(%d %d)\n",
|
winDebug("winMWExtWMResizeFrame (%p) (%d %d)-(%d %d)\n",
|
||||||
(int) pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight);
|
pRLWinPriv, iNewX, iNewY, uiNewWidth, uiNewHeight);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pRLWinPriv->fResized = TRUE;
|
pRLWinPriv->fResized = TRUE;
|
||||||
|
@ -526,7 +526,7 @@ winMWExtWMRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid)
|
||||||
Bool fNeedRestack = TRUE;
|
Bool fNeedRestack = TRUE;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMRestackFrame (%08x)\n", (int) pRLWinPriv);
|
winDebug("winMWExtWMRestackFrame (%p)\n", pRLWinPriv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pScreenPriv && pScreenPriv->fRestacking)
|
if (pScreenPriv && pScreenPriv->fRestacking)
|
||||||
|
@ -612,7 +612,7 @@ winMWExtWMRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid)
|
||||||
0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||||
}
|
}
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMRestackFrame - done (%08x)\n", (int) pRLWinPriv);
|
winDebug("winMWExtWMRestackFrame - done (%p)\n", pRLWinPriv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pRLWinPriv->fRestackingNow = FALSE;
|
pRLWinPriv->fRestackingNow = FALSE;
|
||||||
|
@ -626,7 +626,7 @@ winMWExtWMReshapeFrame(RootlessFrameID wid, RegionPtr pShape)
|
||||||
RECT rcWindow, rcClient;
|
RECT rcWindow, rcClient;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMReshapeFrame (%08x)\n", (int) pRLWinPriv);
|
winDebug("winMWExtWMReshapeFrame (%p)\n", pRLWinPriv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
hRgn = winMWExtWMCreateRgnFromRegion(pShape);
|
hRgn = winMWExtWMCreateRgnFromRegion(pShape);
|
||||||
|
@ -655,7 +655,7 @@ winMWExtWMUnmapFrame(RootlessFrameID wid)
|
||||||
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
|
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMUnmapFrame (%08x)\n", (int) pRLWinPriv);
|
winDebug("winMWExtWMUnmapFrame (%p)\n", pRLWinPriv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_fNoConfigureWindow = TRUE;
|
g_fNoConfigureWindow = TRUE;
|
||||||
|
@ -680,7 +680,7 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
|
||||||
HBITMAP hbmpNew;
|
HBITMAP hbmpNew;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMStartDrawing (%08x) %08x\n", (int) pRLWinPriv,
|
winDebug("winMWExtWMStartDrawing (%p) %08x\n", pRLWinPriv,
|
||||||
pRLWinPriv->fDestroyed);
|
pRLWinPriv->fDestroyed);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -692,8 +692,8 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
|
||||||
pScreenInfo = pScreenPriv->pScreenInfo;
|
pScreenInfo = pScreenPriv->pScreenInfo;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("\tpScreenPriv %08X\n", (int) pScreenPriv);
|
winDebug("\tpScreenPriv %p\n", pScreenPriv);
|
||||||
winDebug("\tpScreenInfo %08X\n", (int) pScreenInfo);
|
winDebug("\tpScreenInfo %p\n", pScreenInfo);
|
||||||
winDebug("\t(%d, %d)\n", (int) pRLWinPriv->pFrame->width,
|
winDebug("\t(%d, %d)\n", (int) pRLWinPriv->pFrame->width,
|
||||||
(int) pRLWinPriv->pFrame->height);
|
(int) pRLWinPriv->pFrame->height);
|
||||||
#endif
|
#endif
|
||||||
|
@ -808,9 +808,9 @@ winMWExtWMStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
|
||||||
ErrorF("winMWExtWMStartDrawing - Already window was destroyed \n");
|
ErrorF("winMWExtWMStartDrawing - Already window was destroyed \n");
|
||||||
}
|
}
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMStartDrawing - done (0x%08x) 0x%08x %d\n",
|
winDebug("winMWExtWMStartDrawing - done (%p) %p %d\n",
|
||||||
(int) pRLWinPriv,
|
pRLWinPriv,
|
||||||
(unsigned int) pRLWinPriv->pfb,
|
pRLWinPriv->pfb,
|
||||||
(unsigned int) pRLWinPriv->dwWidthBytes);
|
(unsigned int) pRLWinPriv->dwWidthBytes);
|
||||||
#endif
|
#endif
|
||||||
*pixelData = pRLWinPriv->pfb;
|
*pixelData = pRLWinPriv->pfb;
|
||||||
|
@ -924,8 +924,8 @@ winMWExtWMRootlessSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin)
|
||||||
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) pFrame->wid;
|
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) pFrame->wid;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMRootlessSwitchWindow (%08x) %08x\n",
|
winDebug("winMWExtWMRootlessSwitchWindow (%p) %p\n",
|
||||||
(int) pRLWinPriv, (int) pRLWinPriv->hWnd);
|
pRLWinPriv, pRLWinPriv->hWnd);
|
||||||
#endif
|
#endif
|
||||||
pRLWinPriv->pFrame = pFrame;
|
pRLWinPriv->pFrame = pFrame;
|
||||||
pRLWinPriv->fResized = TRUE;
|
pRLWinPriv->fResized = TRUE;
|
||||||
|
@ -979,8 +979,8 @@ winMWExtWMCopyWindow(RootlessFrameID wid, int nDstRects,
|
||||||
RECT rcDmg;
|
RECT rcDmg;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("winMWExtWMCopyWindow (%08x, %d, %08x, %d, %d)\n",
|
winDebug("winMWExtWMCopyWindow (%p, %d, %p, %d, %d)\n",
|
||||||
(int) pRLWinPriv, nDstRects, (int) pDstRects, nDx, nDy);
|
pRLWinPriv, nDstRects, pDstRects, nDx, nDy);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (pEnd = pDstRects + nDstRects; pDstRects < pEnd; pDstRects++) {
|
for (pEnd = pDstRects + nDstRects; pDstRects < pEnd; pDstRects++) {
|
||||||
|
|
|
@ -213,8 +213,8 @@ winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv,
|
||||||
|
|
||||||
showCmd |= SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER;
|
showCmd |= SWP_NOMOVE | SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOZORDER;
|
||||||
|
|
||||||
winDebug("winMWExtWMUpdateWindowDecoration %08x %s\n",
|
winDebug("winMWExtWMUpdateWindowDecoration %p %s\n",
|
||||||
(int) pRLWinPriv, fDecorate ? "Decorate" : "Bare");
|
pRLWinPriv, fDecorate ? "Decorate" : "Bare");
|
||||||
|
|
||||||
/* Get the extended window style information */
|
/* Get the extended window style information */
|
||||||
dwExStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE);
|
dwExStyle = GetWindowLongPtr(pRLWinPriv->hWnd, GWL_EXSTYLE);
|
||||||
|
|
|
@ -832,24 +832,24 @@ winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
if (!(pWinPos->flags & SWP_NOZORDER)) {
|
if (!(pWinPos->flags & SWP_NOZORDER)) {
|
||||||
if (pRLWinPriv->fRestackingNow || pScreenPriv->fRestacking) {
|
if (pRLWinPriv->fRestackingNow || pScreenPriv->fRestacking) {
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("Win %08x is now restacking.\n",
|
winDebug("Win %p is now restacking.\n",
|
||||||
(unsigned int) pRLWinPriv);
|
pRLWinPriv);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (winIsInternalWMRunning(pScreenInfo) || IsRaiseOnClick(pWin)) {
|
if (winIsInternalWMRunning(pScreenInfo) || IsRaiseOnClick(pWin)) {
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("Win %08x has WINDOWSWM_RAISE_ON_CLICK.\n",
|
winDebug("Win %p has WINDOWSWM_RAISE_ON_CLICK.\n",
|
||||||
(unsigned int) pRLWinPriv);
|
pRLWinPriv);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
winDebug("Win %08x forbid to change z order (%08x).\n",
|
winDebug("Win %p forbid to change z order (%p).\n",
|
||||||
(unsigned int) pRLWinPriv,
|
pRLWinPriv,
|
||||||
(unsigned int) pWinPos->hwndInsertAfter);
|
pWinPos->hwndInsertAfter);
|
||||||
#endif
|
#endif
|
||||||
pWinPos->flags |= SWP_NOZORDER;
|
pWinPos->flags |= SWP_NOZORDER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,7 +246,7 @@ winWindowsWMSendEvent(int type, unsigned int mask, int which, int arg,
|
||||||
for (pEvent = *pHead; pEvent; pEvent = pEvent->next) {
|
for (pEvent = *pHead; pEvent; pEvent = pEvent->next) {
|
||||||
client = pEvent->client;
|
client = pEvent->client;
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
ErrorF("winWindowsWMSendEvent - x%08x\n", (int) client);
|
ErrorF("winWindowsWMSendEvent - %p\n", client);
|
||||||
#endif
|
#endif
|
||||||
if ((pEvent->mask & mask) == 0) {
|
if ((pEvent->mask & mask) == 0) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -381,8 +381,8 @@ ProcWindowsWMFrameDraw(ClientPtr client)
|
||||||
return BadWindow;
|
return BadWindow;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
ErrorF("ProcWindowsWMFrameDraw - HWND 0x%08x 0x%08x 0x%08x\n",
|
ErrorF("ProcWindowsWMFrameDraw - HWND %p 0x%08x 0x%08x\n",
|
||||||
(int) pRLWinPriv->hWnd, (int) stuff->frame_style,
|
pRLWinPriv->hWnd, (int) stuff->frame_style,
|
||||||
(int) stuff->frame_style_ex);
|
(int) stuff->frame_style_ex);
|
||||||
ErrorF("ProcWindowsWMFrameDraw - %d %d %d %d\n",
|
ErrorF("ProcWindowsWMFrameDraw - %d %d %d %d\n",
|
||||||
stuff->ix, stuff->iy, stuff->iw, stuff->ih);
|
stuff->ix, stuff->iy, stuff->iw, stuff->ih);
|
||||||
|
|
Loading…
Reference in New Issue