summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2015-02-09 12:54:21 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2015-02-09 12:54:21 +0000
commit89f670364cdf575e65cd1c279dbed296ed203635 (patch)
tree4cec57aca145fed1e4bc2f7479c48dd1ad5e022f
parentc4e2c0cb66df2f1aaf7a5c1e872297f9a4306ca4 (diff)
parent8cbaeed1d57103361524ca6083f467d5a505d039 (diff)
Merge branch 'cygwin-warning-fixes-for-1.17' into cygwin-patches-for-1.17xserver-cygwin-1.17.0-1
Conflicts: hw/xwin/winclipboard/internal.h hw/xwin/winclipboard/xevents.c hw/xwin/winconfig.c hw/xwin/winkeybd.c
-rw-r--r--hw/xwin/glx/indirect.c12
-rw-r--r--hw/xwin/winallpriv.c4
-rw-r--r--hw/xwin/winclipboard/internal.h4
-rw-r--r--hw/xwin/winclipboard/wndproc.c10
-rw-r--r--hw/xwin/winclipboard/xevents.c18
-rw-r--r--hw/xwin/wincmap.c2
-rw-r--r--hw/xwin/winconfig.c4
-rw-r--r--hw/xwin/wincreatewnd.c2
-rw-r--r--hw/xwin/winmsg.c8
-rw-r--r--hw/xwin/winmultiwindowwindow.c7
-rw-r--r--hw/xwin/winmultiwindowwndproc.c6
-rw-r--r--hw/xwin/winrandr.c2
-rw-r--r--hw/xwin/winscrinit.c4
-rw-r--r--hw/xwin/winwndproc.c2
-rw-r--r--hw/xwin/wmutil/keyboard.c2
15 files changed, 44 insertions, 43 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index d2928106c..ad35c834c 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -207,7 +207,7 @@ pfdOut(const PIXELFORMATDESCRIPTOR * pfd)
ErrorF("PIXELFORMATDESCRIPTOR:\n");
ErrorF("nSize = %u\n", pfd->nSize);
ErrorF("nVersion = %u\n", pfd->nVersion);
- ErrorF("dwFlags = %lu = {", pfd->dwFlags);
+ ErrorF("dwFlags = %u = {", (unsigned int)pfd->dwFlags);
DUMP_PFD_FLAG(PFD_DOUBLEBUFFER);
DUMP_PFD_FLAG(PFD_STEREO);
DUMP_PFD_FLAG(PFD_DRAW_TO_WINDOW);
@@ -251,9 +251,9 @@ pfdOut(const PIXELFORMATDESCRIPTOR * pfd)
ErrorF("cAuxBuffers = %hhu\n", pfd->cAuxBuffers);
ErrorF("iLayerType = %hhu\n", pfd->iLayerType);
ErrorF("bReserved = %hhu\n", pfd->bReserved);
- ErrorF("dwLayerMask = %lu\n", pfd->dwLayerMask);
- ErrorF("dwVisibleMask = %lu\n", pfd->dwVisibleMask);
- ErrorF("dwDamageMask = %lu\n", pfd->dwDamageMask);
+ ErrorF("dwLayerMask = %u\n", (unsigned int)pfd->dwLayerMask);
+ ErrorF("dwVisibleMask = %u\n", (unsigned int)pfd->dwVisibleMask);
+ ErrorF("dwDamageMask = %u\n", (unsigned int)pfd->dwDamageMask);
ErrorF("\n");
}
@@ -1964,8 +1964,8 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen * screen)
if (!(pfd.dwFlags & (PFD_DRAW_TO_WINDOW | PFD_DRAW_TO_BITMAP)) ||
!(pfd.dwFlags & PFD_SUPPORT_OPENGL)) {
GLWIN_DEBUG_MSG
- ("pixelFormat %d has unsuitable flags 0x%08lx, skipping", i + 1,
- pfd.dwFlags);
+ ("pixelFormat %d has unsuitable flags 0x%08x, skipping", i + 1,
+ (unsigned int)pfd.dwFlags);
continue;
}
diff --git a/hw/xwin/winallpriv.c b/hw/xwin/winallpriv.c
index 629af92c9..816b030ca 100644
--- a/hw/xwin/winallpriv.c
+++ b/hw/xwin/winallpriv.c
@@ -48,8 +48,8 @@ winAllocatePrivates(ScreenPtr pScreen)
winPrivScreenPtr pScreenPriv;
#if CYGDEBUG
- winDebug("winAllocateScreenPrivates - g_ulServerGeneration: %d "
- "serverGeneration: %d\n", g_ulServerGeneration, serverGeneration);
+ winDebug("winAllocateScreenPrivates - g_ulServerGeneration: %lu "
+ "serverGeneration: %lu\n", g_ulServerGeneration, serverGeneration);
#endif
/* We need a new slot for our privates if the screen gen has changed */
diff --git a/hw/xwin/winclipboard/internal.h b/hw/xwin/winclipboard/internal.h
index ad5776b50..20754e72e 100644
--- a/hw/xwin/winclipboard/internal.h
+++ b/hw/xwin/winclipboard/internal.h
@@ -49,8 +49,8 @@
* References to external symbols
*/
-extern void winDebug(const char *format, ...);
-extern void ErrorF(const char *format, ...);
+extern void winDebug(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void ErrorF(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2);
extern void winDebugWin32Message(const char *function, HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam);
diff --git a/hw/xwin/winclipboard/wndproc.c b/hw/xwin/winclipboard/wndproc.c
index 6aadb18ae..5f1886f65 100644
--- a/hw/xwin/winclipboard/wndproc.c
+++ b/hw/xwin/winclipboard/wndproc.c
@@ -107,7 +107,7 @@ winProcessXEventsTimeout(HWND hwnd, Window iWindow, Display * pDisplay,
remainingTime = dwStopTime - GetTickCount();
tv.tv_sec = remainingTime / 1000;
tv.tv_usec = (remainingTime % 1000) * 1000;
- winDebug("winProcessXEventsTimeout () - %d milliseconds left\n",
+ winDebug("winProcessXEventsTimeout () - %ld milliseconds left\n",
remainingTime);
/* Break out if no time left */
@@ -219,8 +219,8 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_CHANGECBCHAIN:
{
winDebug("winClipboardWindowProc - WM_CHANGECBCHAIN: wParam(%x) "
- "lParam(%x) s_hwndNextViewer(%x)\n",
- wParam, lParam, s_hwndNextViewer);
+ "lParam(%x) s_hwndNextViewer(%p)\n",
+ (int)wParam, (int)lParam, s_hwndNextViewer);
if ((HWND) wParam == s_hwndNextViewer) {
s_hwndNextViewer = (HWND) lParam;
@@ -265,7 +265,7 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
first = GetClipboardViewer(); /* Get handle to first viewer in chain. */
if (first == hwnd)
return 0; /* Make sure it's not us! */
- winDebug(" WM_WM_REINIT: Replacing us(%x) with %x at head "
+ winDebug(" WM_WM_REINIT: Replacing us(%p) with %p at head "
"of chain\n", hwnd, s_hwndNextViewer);
s_fCBCInitialized = FALSE;
ChangeClipboardChain(hwnd, s_hwndNextViewer);
@@ -507,7 +507,7 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
int best_target = 0;
winDebug("winClipboardWindowProc - WM_RENDERFORMAT %d - Hello.\n",
- wParam);
+ (int)wParam);
/* Flag whether to convert to Unicode or not */
fConvertToUnicode = (CF_UNICODETEXT == wParam);
diff --git a/hw/xwin/winclipboard/xevents.c b/hw/xwin/winclipboard/xevents.c
index 312955186..be01b76c5 100644
--- a/hw/xwin/winclipboard/xevents.c
+++ b/hw/xwin/winclipboard/xevents.c
@@ -119,7 +119,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);
}
@@ -186,7 +186,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);
}
@@ -247,12 +247,12 @@ winClipboardFlushXEvents(HWND hwnd,
pszAtomName = XGetAtomName(pDisplay,
event.xselectionrequest.selection);
- winDebug("winClipboardFlushXEvents - SelectionRequest - Selection %d = %s\n", event.xselectionrequest.selection, pszAtomName);
+ winDebug("winClipboardFlushXEvents - SelectionRequest - Selection %ld = %s\n", event.xselectionrequest.selection, pszAtomName);
XFree(pszAtomName);
pszAtomName = XGetAtomName(pDisplay,
event.xselectionrequest.target);
- winDebug("winClipboardFlushXEvents - SelectionRequest - Target %d = %s\n", event.xselectionrequest.target, pszAtomName);
+ winDebug("winClipboardFlushXEvents - SelectionRequest - Target %ld = %s\n", event.xselectionrequest.target, pszAtomName);
XFree(pszAtomName);
pszAtomName = NULL;
}
@@ -326,7 +326,7 @@ winClipboardFlushXEvents(HWND hwnd,
/* Access the clipboard */
if (!OpenClipboard(hwnd)) {
ErrorF("winClipboardFlushXEvents - SelectionRequest - "
- "OpenClipboard () failed: %08lx owner %p '%s'\n", GetLastError(), GetClipboardOwner(), GetWindowName(GetClipboardOwner()));
+ "OpenClipboard () failed: %08x owner %p '%s'\n", (unsigned int)GetLastError(), GetClipboardOwner(), GetWindowName(GetClipboardOwner()));
/* Abort */
fAbort = TRUE;
@@ -388,7 +388,7 @@ winClipboardFlushXEvents(HWND hwnd,
unsigned int format = 0;
ErrorF("winClipboardFlushXEvents - SelectionRequest - "
- "GetClipboardData () failed: %08lx\n", GetLastError());
+ "GetClipboardData () failed: %08x\n", (unsigned int)GetLastError());
do {
format = EnumClipboardFormats(format);
@@ -600,7 +600,7 @@ winClipboardFlushXEvents(HWND hwnd,
if (event.xselection.property == None) {
char *pszAtomName = XGetAtomName(pDisplay, event.xselection.target);
ErrorF("winClipboardFlushXEvents - SelectionNotify - "
- "Conversion to format %s %d refused.\n",
+ "Conversion to format %s %ld refused.\n",
pszAtomName, event.xselection.target);
XFree(pszAtomName);
return WIN_XEVENTS_FAILED;
@@ -631,7 +631,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("SelectionNotify - encoding atom name %s\n",
@@ -747,7 +747,7 @@ winClipboardFlushXEvents(HWND hwnd,
/* Check that global memory was allocated */
if (!hGlobal) {
ErrorF("winClipboardFlushXEvents - SelectionNotify "
- "GlobalAlloc failed, aborting: %ld\n", GetLastError());
+ "GlobalAlloc failed, aborting: %08x\n", (unsigned int)GetLastError());
/* Abort */
fAbort = TRUE;
diff --git a/hw/xwin/wincmap.c b/hw/xwin/wincmap.c
index 1bdc7df70..318bfac11 100644
--- a/hw/xwin/wincmap.c
+++ b/hw/xwin/wincmap.c
@@ -515,7 +515,7 @@ winCreateDefColormap(ScreenPtr pScreen)
*/
#if CYGDEBUG
- winDebug("winCreateDefColormap - defColormap: %d\n", pScreen->defColormap);
+ winDebug("winCreateDefColormap - defColormap: %lu\n", pScreen->defColormap);
#endif
/* Allocate an X colormap, owned by client 0 */
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index dbf1eb673..28629a849 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -264,8 +264,8 @@ winConfigKeyboard(DeviceIntPtr pDevice)
break;
}
g_winInfo.keyboard.rate = (kbd_speed > 0) ? kbd_speed : 1;
- winMsg(X_PROBED, "Setting autorepeat to delay=%d, rate=%d\n",
- g_winInfo.keyboard.delay, g_winInfo.keyboard.rate);
+ winMsg(X_PROBED, "Setting autorepeat to delay=%ld, rate=%ld\n",
+ g_winInfo.keyboard.delay, g_winInfo.keyboard.rate);
}
}
diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c
index 7810c6baa..c2851ada1 100644
--- a/hw/xwin/wincreatewnd.c
+++ b/hw/xwin/wincreatewnd.c
@@ -357,7 +357,7 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
}
winDebug("winCreateBoundingWindowWindowed - WindowClient "
- "w %ld h %ld r %ld l %ld b %ld t %ld\n",
+ "w %d h %d r %d l %d b %d t %d\n",
rcClient.right - rcClient.left,
rcClient.bottom - rcClient.top,
rcClient.right, rcClient.left, rcClient.bottom, rcClient.top);
diff --git a/hw/xwin/winmsg.c b/hw/xwin/winmsg.c
index ddfce9b3b..1d3a387d8 100644
--- a/hw/xwin/winmsg.c
+++ b/hw/xwin/winmsg.c
@@ -139,8 +139,8 @@ winDebugWin32Message(const char *function, HWND hwnd, UINT message,
getenv("WIN_DEBUG_WM_USER")) {
winDebug("%s - Message WM_USER + %d\n", function,
message - WM_USER);
- winDebug("\thwnd 0x%x wParam 0x%x lParam 0x%x\n", hwnd, wParam,
- lParam);
+ winDebug("\thwnd 0x%p wParam 0x%x lParam 0x%x\n", hwnd, (int)wParam,
+ (int)lParam);
}
}
else if (message < MESSAGE_NAMES_LEN && MESSAGE_NAMES[message]) {
@@ -151,8 +151,8 @@ winDebugWin32Message(const char *function, HWND hwnd, UINT message,
buffer[63] = 0;
if (force || getenv("WIN_DEBUG_MESSAGES") || getenv(buffer)) {
winDebug("%s - Message %s\n", function, MESSAGE_NAMES[message]);
- winDebug("\thwnd 0x%x wParam 0x%x lParam 0x%x\n", hwnd, wParam,
- lParam);
+ winDebug("\thwnd 0x%p wParam 0x%x lParam 0x%x\n", hwnd, (int)wParam,
+ (int)lParam);
}
}
}
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 499ba9f08..e4e6db0d6 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -326,7 +326,7 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
#endif
#if CYGWINDOWING_DEBUG
- ErrorF("\tMoveWindow to (%ld, %ld) - %ldx%ld\n", rcNew.left, rcNew.top,
+ ErrorF("\tMoveWindow to (%d, %d) - %dx%d\n", rcNew.left, rcNew.top,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top);
#endif
/* Change the position and dimensions of the Windows window */
@@ -1220,8 +1220,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));
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 117b8a31d..b4eb9dd6a 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -771,18 +771,18 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
ErrorF("\nCYGWINDOWING Dump:\n"
"\tdrawable: (%hd, %hd) - %hdx%hd\n", pDraw->x,
pDraw->y, pDraw->width, pDraw->height);
- ErrorF("\twindPlace: (%ld, %ld) - %ldx%ld\n", pRect->left,
+ ErrorF("\twindPlace: (%d, %d) - %dx%d\n", pRect->left,
pRect->top, pRect->right - pRect->left,
pRect->bottom - pRect->top);
if (GetClientRect(hwnd, &rc)) {
pRect = &rc;
- ErrorF("\tClientRect: (%ld, %ld) - %ldx%ld\n", pRect->left,
+ ErrorF("\tClientRect: (%d, %d) - %dx%d\n", pRect->left,
pRect->top, pRect->right - pRect->left,
pRect->bottom - pRect->top);
}
if (GetWindowRect(hwnd, &rc)) {
pRect = &rc;
- ErrorF("\tWindowRect: (%ld, %ld) - %ldx%ld\n", pRect->left,
+ ErrorF("\tWindowRect: (%d, %d) - %dx%d\n", pRect->left,
pRect->top, pRect->right - pRect->left,
pRect->bottom - pRect->top);
}
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index 5624e7563..6a93c44cc 100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
@@ -178,7 +178,7 @@ winRandRScreenSetSize(ScreenPtr pScreen,
*/
AdjustWindowRectEx(&rcClient, dwStyle, FALSE, dwExStyle);
- ErrorF("winRandRScreenSetSize new window area w: %ld h: %ld\n",
+ ErrorF("winRandRScreenSetSize new window area w: %d h: %d\n",
rcClient.right - rcClient.left, rcClient.bottom - rcClient.top);
SetWindowPos(pScreenPriv->hwndScreen, NULL,
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 31d5fdd36..95a3e2355 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -89,8 +89,8 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv)
DWORD dwInitialBPP;
#if CYGDEBUG || YES
- winDebug("winScreenInit - dwWidth: %ld dwHeight: %ld\n",
- pScreenInfo->dwWidth, pScreenInfo->dwHeight);
+ winDebug("winScreenInit - dwWidth: %d dwHeight: %d\n",
+ (unsigned int)pScreenInfo->dwWidth, (unsigned int)pScreenInfo->dwHeight);
#endif
/* Allocate privates for this screen */
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index 999bea3c0..a8477aac8 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -171,7 +171,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
ErrorF("winWindowProc - WM_DISPLAYCHANGE - new width: %d "
"new height: %d new bpp: %d\n",
- LOWORD(lParam), HIWORD(lParam), wParam);
+ LOWORD(lParam), HIWORD(lParam), (int)wParam);
/* 0 bpp has no defined meaning, ignore this message */
if (wParam == 0)
diff --git a/hw/xwin/wmutil/keyboard.c b/hw/xwin/wmutil/keyboard.c
index 780668d42..3f785e7d8 100644
--- a/hw/xwin/wmutil/keyboard.c
+++ b/hw/xwin/wmutil/keyboard.c
@@ -63,7 +63,7 @@ winTranslateKey(WPARAM wParam, LPARAM lParam)
int iParamScanCode = LOBYTE(iParam);
int iScanCode;
- winDebug("winTranslateKey: wParam %08x lParam %08x\n", wParam, lParam);
+ winDebug("winTranslateKey: wParam %08x lParam %08x\n", (unsigned int)wParam, (unsigned int)lParam);
/* WM_ key messages faked by Vista speech recognition (WSR) don't have a
* scan code.