From 0cd228073ad3b7eb72cef8b61128324895ee6cd4 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Mon, 29 Jun 2015 15:08:51 +0100 Subject: [PATCH] hw/xwin: printf format fixes for Pixel type Pixel is CARD32, so inside the server has type unsigned int (x86_64) or unsigned long (x86) Cast to unsigned int and use a %u format Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/wincmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xwin/wincmap.c b/hw/xwin/wincmap.c index 318bfac11..000334ce3 100644 --- a/hw/xwin/wincmap.c +++ b/hw/xwin/wincmap.c @@ -360,8 +360,8 @@ winGetPaletteDIB(ScreenPtr pScreen, ColormapPtr pcmap) nBlue = rgbColors[i].rgbBlue << 8; #if CYGDEBUG - winDebug("winGetPaletteDIB - Allocating a color: %d; " - "%d %d %d\n", pixel, nRed, nGreen, nBlue); + winDebug("winGetPaletteDIB - Allocating a color: %u; " + "%d %d %d\n", (unsigned int)pixel, nRed, nGreen, nBlue); #endif /* Allocate a entry in the X colormap */ @@ -445,8 +445,8 @@ winGetPaletteDD(ScreenPtr pScreen, ColormapPtr pcmap) nGreen = ppeColors[i].peGreen << 8; nBlue = ppeColors[i].peBlue << 8; #if CYGDEBUG - winDebug("winGetPaletteDD - Allocating a color: %d; " - "%d %d %d\n", pixel, nRed, nGreen, nBlue); + winDebug("winGetPaletteDD - Allocating a color: %u; " + "%d %d %d\n", (unsigned int)pixel, nRed, nGreen, nBlue); #endif if (AllocColor(pcmap, &nRed, &nGreen, &nBlue, &pixel, 0) != Success) { ErrorF("winGetPaletteDD - AllocColor () failed, pixel %d\n", i);