[PATCH v2 05/10] fb: Mark some variables as unused.

Cyril Brulebois kibi at debian.org
Thu Jun 2 18:00:40 PDT 2011


There's no use for the values set through the various macro calls
(fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused.

The following warnings go away accordingly:
|   CC     libfb_la-fb24_32.lo
| fb24_32.c: In function 'fb24_32ReformatTile':
| fb24_32.c:544:19: warning: variable 'newYoff' set but not used [-Wunused-but-set-variable]
| fb24_32.c:544:10: warning: variable 'newXoff' set but not used [-Wunused-but-set-variable]
| fb24_32.c:543:19: warning: variable 'oldYoff' set but not used [-Wunused-but-set-variable]
| fb24_32.c:543:10: warning: variable 'oldXoff' set but not used [-Wunused-but-set-variable]
|   CC     libfb_la-fbfill.lo
| fbfill.c: In function 'fbFill':
| fbfill.c:72:21: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable]
| fbfill.c:72:11: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable]
| fbfill.c:100:21: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable]
| fbfill.c:100:11: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable]
| fbfill.c:142:20: warning: variable 'tileYoff' set but not used [-Wunused-but-set-variable]
| fbfill.c:142:10: warning: variable 'tileXoff' set but not used [-Wunused-but-set-variable]
|   CC     libfb_la-fbgc.lo
| fbgc.c: In function 'fbPadPixmap':
| fbgc.c:92:19: warning: variable 'yOff' set but not used [-Wunused-but-set-variable]
| fbgc.c:92:13: warning: variable 'xOff' set but not used [-Wunused-but-set-variable]
| fbgc.c: In function 'fbCanEvenStipple':
| fbgc.c:166:23: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable]
| fbgc.c:166:13: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable]
|   CC     libfb_la-fbpush.lo
| fbpush.c: In function 'fbPushPixels':
| fbpush.c:238:20: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable]
| fbpush.c:238:10: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable]

Disgusted-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 fb/fb24_32.c |    4 ++--
 fb/fbfill.c  |    6 +++---
 fb/fbgc.c    |    4 ++--
 fb/fbpush.c  |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index 2e600ed..033fa46 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -540,8 +540,8 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
     FbStride	oldStride, newStride;
     int		oldBpp, newBpp;
     fb24_32BltFunc  blt;
-    int		oldXoff, oldYoff;
-    int		newXoff, newYoff;
+    _X_UNUSED int   oldXoff, oldYoff;
+    _X_UNUSED int   newXoff, newYoff;
 
     pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
 				     pOldTile->drawable.height,
diff --git a/fb/fbfill.c b/fb/fbfill.c
index 801a0d0..e62a48a 100644
--- a/fb/fbfill.c
+++ b/fb/fbfill.c
@@ -69,7 +69,7 @@ fbFill (DrawablePtr pDrawable,
 	    FbBits	*stip;
 	    FbStride    stipStride;
 	    int		stipBpp;
-	    int		stipXoff, stipYoff; /* XXX assumed to be zero */
+	    _X_UNUSED int	stipXoff, stipYoff;
 
 	    if (pGC->fillStyle == FillStippled)
 		alu = FbStipple1Rop(pGC->alu,pGC->fgPixel);
@@ -97,7 +97,7 @@ fbFill (DrawablePtr pDrawable,
 	    FbStip	*stip;
 	    FbStride    stipStride;
 	    int		stipBpp;
-	    int		stipXoff, stipYoff; /* XXX assumed to be zero */
+	    _X_UNUSED int	stipXoff, stipYoff;
 	    FbBits	fgand, fgxor, bgand, bgxor;
 
 	    fgand = pPriv->and;
@@ -139,7 +139,7 @@ fbFill (DrawablePtr pDrawable,
 	int	    tileBpp;
 	int	    tileWidth;
 	int	    tileHeight;
-	int	    tileXoff, tileYoff; /* XXX assumed to be zero */
+	_X_UNUSED int	tileXoff, tileYoff;
 	
 	fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff);
 	tileWidth = pTile->drawable.width;
diff --git a/fb/fbgc.c b/fb/fbgc.c
index cc504c1..8108c3a 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -89,7 +89,7 @@ fbPadPixmap (PixmapPtr pPixmap)
     int	    w;
     int     stride;
     int     bpp;
-    int     xOff, yOff;
+    _X_UNUSED int xOff, yOff;
 
     fbGetDrawable (&pPixmap->drawable, bits, stride, bpp, xOff, yOff);
 
@@ -163,7 +163,7 @@ fbCanEvenStipple (PixmapPtr pStipple, int bpp)
     FbBits  *bits;
     int	    stride;
     int	    stip_bpp;
-    int	    stipXoff, stipYoff;
+    _X_UNUSED int stipXoff, stipYoff;
     int	    h;
 
     /* can't even stipple 24bpp drawables */
diff --git a/fb/fbpush.c b/fb/fbpush.c
index 9d82718..8dd7c2b 100644
--- a/fb/fbpush.c
+++ b/fb/fbpush.c
@@ -235,7 +235,7 @@ fbPushPixels (GCPtr	    pGC,
     FbStip	*stip;
     FbStride	stipStride;
     int		stipBpp;
-    int		stipXoff, stipYoff; /* Assumed to be zero */
+    _X_UNUSED int	stipXoff, stipYoff;
 
     fbGetStipDrawable (&pBitmap->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff);
 
-- 
1.7.5.3



More information about the xorg-devel mailing list