diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-03-18 16:46:34 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-05-02 14:53:06 +0200 |
commit | b5b7a2d26b4c2b02fa2889e1ed9e0c64ccfb8273 (patch) | |
tree | 8f7f712240536a1996d99fc6702e19114d1bc7e5 | |
parent | ab50f84b50c8f11e0be813a5e54ca307e72a656f (diff) | |
download | nx-libs-b5b7a2d26b4c2b02fa2889e1ed9e0c64ccfb8273.tar.gz nx-libs-b5b7a2d26b4c2b02fa2889e1ed9e0c64ccfb8273.tar.bz2 nx-libs-b5b7a2d26b4c2b02fa2889e1ed9e0c64ccfb8273.zip |
hw/nxagent/Screen.c: Cast proper types before handing values over to fprintf().
Amends the following compiler warnings:
```
Screen.c: In function ‘nxagentCreateIconWindow’:
Screen.c:394:15: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Window’ [-Wformat=]
nxagentIconWindow);
^
Screen.c: In function ‘nxagentSetScreenSaverTime’:
Screen.c:456:19: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘CARD32’ [-Wformat=]
ScreenSaverTime, ScreenSaverInterval);
^
Screen.c:456:19: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ [-Wformat=]
Screen.c:476:19: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘CARD32’ [-Wformat=]
ScreenSaverTime, ScreenSaverInterval);
^
Screen.c:476:19: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ [-Wformat=]
Screen.c: In function ‘nxagentOpenScreen’:
Screen.c:1234:19: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘VisualID’ [-Wformat=]
visuals[numVisuals].vid);
^
Screen.c:1274:23: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘VisualID’ [-Wformat=]
depths[depthIndex].depth);
^
Screen.c:1282:17: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘VisualID’ [-Wformat=]
defaultVisualIndex, visuals[defaultVisualIndex].vid);
^
Screen.c:1319:19: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘VisualID’ [-Wformat=]
rootDepth, defaultVisual);
^
Screen.c:1336:19: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘VisualID’ [-Wformat=]
rootDepth, defaultVisual);
^
Screen.c:1348:19: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘VisualID’ [-Wformat=]
rootDepth, defaultVisual);
^
Screen.c:1357:19: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘VisualID’ [-Wformat=]
rootDepth, defaultVisual);
^
Screen.c:1723:21: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Window’ [-Wformat=]
nxagentDefaultWindows[pScreen->myNum]);
^
Screen.c:1763:19: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Window’ [-Wformat=]
nxagentDefaultWindows[pScreen->myNum]);
^
Screen.c:1775:17: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Window’ [-Wformat=]
nxagentDefaultWindows[pScreen->myNum]);
^
Screen.c:1790:17: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Window’ [-Wformat=]
nxagentDefaultWindows[pScreen->myNum]);
^
Screen.c: In function ‘nxagentShadowAdaptDepth’:
Screen.c:3189:14: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
pVisual -> red_mask, pVisual -> green_mask, pVisual -> blue_mask);
^
Screen.c:3189:14: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
Screen.c:3189:14: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
Screen.c:3198:15: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
redMask, greenMask, blueMask);
^
Screen.c:3198:15: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
Screen.c:3198:15: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
```
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Screen.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index c5e09df49..83bcc01fd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -391,8 +391,8 @@ Window nxagentCreateIconWindow() valuemask, &attributes); #ifdef TEST - fprintf(stderr, "nxagentCreateIconWindow: Created new icon window with id [%ld].\n", - nxagentIconWindow); + fprintf(stderr, "nxagentCreateIconWindow: Created new icon window with id [%lu].\n", + (long unsigned int)nxagentIconWindow); #endif /* @@ -454,7 +454,7 @@ void nxagentSetScreenSaverTime(void) { #ifdef TEST fprintf(stderr, "nxagentSetScreenSaverTime: ScreenSaverTime was [%lu], ScreenSaverInterval was [%lu].\n", - ScreenSaverTime, ScreenSaverInterval); + (long unsigned int)ScreenSaverTime, (long unsigned int)ScreenSaverInterval); #endif /* @@ -474,7 +474,7 @@ void nxagentSetScreenSaverTime(void) #ifdef TEST fprintf(stderr, "nxagentSetScreenSaverTime: ScreenSaverTime now is [%lu], ScreenSaverInterval now is [%lu].\n", - ScreenSaverTime, ScreenSaverInterval); + (long unsigned int)ScreenSaverTime, (long unsigned int)ScreenSaverInterval); #endif } @@ -1232,7 +1232,7 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, #if defined(DEBUG) || defined(DEBUG_COLORMAP) fprintf(stderr, "Debug: Added visual [%lu].\n" , - visuals[numVisuals].vid); + (long unsigned int)visuals[numVisuals].vid); #endif for (j = 0; j < numDepths; j++) @@ -1271,7 +1271,7 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, #if defined(DEBUG) || defined(DEBUG_COLORMAP) fprintf(stderr, "Debug: Registered visual [%lu] for depth [%d (%d)].\n" , - visuals[numVisuals].vid, depthIndex, + (long unsigned int)visuals[numVisuals].vid, depthIndex, depths[depthIndex].depth); #endif @@ -1280,7 +1280,7 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, #if defined(DEBUG) || defined(DEBUG_COLORMAP) fprintf(stderr, "Debug: Setting default visual [%d (%lu)].\n", - defaultVisualIndex, visuals[defaultVisualIndex].vid); + defaultVisualIndex, (long unsigned int)visuals[defaultVisualIndex].vid); fprintf(stderr, "Debug: Setting root depth [%d].\n", visuals[defaultVisualIndex].nplanes); @@ -1316,8 +1316,8 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, #if defined(DEBUG) || defined(DEBUG_COLORMAP) fprintf(stderr, "nxagentOpenScreen: Before fbScreenInit numVisuals [%d] numDepths [%d] " - "rootDepth [%d] defaultVisual [%ld].\n", numVisuals, numDepths, - rootDepth, defaultVisual); + "rootDepth [%d] defaultVisual [%lu].\n", numVisuals, numDepths, + rootDepth, (long unsigned int)defaultVisual); #endif if (monitorResolution < 1) @@ -1333,8 +1333,8 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, #if defined(DEBUG) || defined(DEBUG_COLORMAP) fprintf(stderr, "nxagentOpenScreen: After fbScreenInit numVisuals [%d] numDepths [%d] " - "rootDepth [%d] defaultVisual [%ld].\n", numVisuals, numDepths, - rootDepth, defaultVisual); + "rootDepth [%d] defaultVisual [%lu].\n", numVisuals, numDepths, + rootDepth, (long unsigned int)defaultVisual); #endif /* @@ -1345,8 +1345,8 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, #if defined(DEBUG) || defined(DEBUG_COLORMAP) fprintf(stderr, "nxagentOpenScreen: Before GLX numVisuals [%d] numDepths [%d] " - "rootDepth [%d] defaultVisual [%ld].\n", numVisuals, numDepths, - rootDepth, defaultVisual); + "rootDepth [%d] defaultVisual [%lu].\n", numVisuals, numDepths, + rootDepth, (long unsigned int)defaultVisual); #endif nxagentInitGlxExtension(&visuals, &depths, &numVisuals, &numDepths, @@ -1354,8 +1354,8 @@ Bool nxagentOpenScreen(int index, ScreenPtr pScreen, #if defined(DEBUG) || defined(DEBUG_COLORMAP) fprintf(stderr, "nxagentOpenScreen: After GLX numVisuals [%d] numDepths [%d] " - "rootDepth [%d] defaultVisual [%ld].\n", numVisuals, numDepths, - rootDepth, defaultVisual); + "rootDepth [%d] defaultVisual [%lu].\n", numVisuals, numDepths, + rootDepth, (long unsigned int)defaultVisual); #endif /* @@ -1721,7 +1721,7 @@ N/A #ifdef TEST fprintf(stderr, "nxagentOpenScreen: Using root window id [%ld].\n", - nxagentDefaultWindows[pScreen->myNum]); + (long int)nxagentDefaultWindows[pScreen->myNum]); #endif } @@ -1761,7 +1761,7 @@ N/A #ifdef TEST fprintf(stderr, "nxagentOpenScreen: Created new default window with id [%ld].\n", - nxagentDefaultWindows[pScreen->myNum]); + (long int)nxagentDefaultWindows[pScreen->myNum]); #endif /* @@ -1773,7 +1773,7 @@ N/A { #ifdef TEST fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n", - nxagentDefaultWindows[pScreen->myNum]); + (long int)nxagentDefaultWindows[pScreen->myNum]); #endif XClassHint hint; hint.res_name=malloc(strlen("X2GoAgent")+1); @@ -1788,7 +1788,7 @@ N/A { #ifdef TEST fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window withid [%ld].\n", - nxagentDefaultWindows[pScreen->myNum]); + (long int)nxagentDefaultWindows[pScreen->myNum]); #endif XClassHint hint; @@ -3186,7 +3186,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, } #ifdef TEST - fprintf(stderr, "nxagentCorrectDepthShadow: Shadow redMask [%x] greenMask[%x] blueMask[%x].\n", + fprintf(stderr, "nxagentCorrectDepthShadow: Shadow redMask [%lu] greenMask[%lu] blueMask[%lu].\n", pVisual -> red_mask, pVisual -> green_mask, pVisual -> blue_mask); #endif @@ -3195,7 +3195,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, blueMask = nxagentShadowDisplay -> screens[0].root_visual[0].blue_mask; #ifdef TEST - fprintf(stderr, "nxagentCorrectDepthShadow: Master redMask [%x] greenMask[%x] blueMask[%x].\n", + fprintf(stderr, "nxagentCorrectDepthShadow: Master redMask [%lu] greenMask[%lu] blueMask[%lu].\n", redMask, greenMask, blueMask); #endif |