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 <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY 2015-06-29 15:08:51 +01:00
parent e3cfeb949a
commit 0cd228073a
1 changed files with 4 additions and 4 deletions

View File

@ -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);