[PATCH xf86-video-s3 3/4] Eliminate set but not used variable compilation warnings

Kevin Brace kevinbrace at gmx.com
Tue Dec 18 23:44:51 UTC 2018


Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 src/s3_IBMRGB.c | 3 +--
 src/s3_driver.c | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/s3_IBMRGB.c b/src/s3_IBMRGB.c
index bc1cd1c..58500ba 100644
--- a/src/s3_IBMRGB.c
+++ b/src/s3_IBMRGB.c
@@ -157,7 +157,7 @@ static void S3ProgramIBMRGBClock(ScrnInfoPtr pScrn, int clk, unsigned char m,
 static void S3IBMRGBSetClock(ScrnInfoPtr pScrn, long freq, int clk, long dacspeed,
 		      long fref)
 {
-	volatile double ffreq, fdacspeed, ffref;
+	volatile double ffreq, ffref;
 	volatile int df, n, m, max_n, min_df;
 	volatile int best_m=69, best_n=17, best_df=0;
 	volatile double diff, mindiff;
@@ -172,7 +172,6 @@ static void S3IBMRGBSetClock(ScrnInfoPtr pScrn, long freq, int clk, long dacspee
 	else
 		ffreq = freq / 1000.0;
 
-	fdacspeed = dacspeed / 1e3;
 	ffref = fref / 1e3;
 
 	ffreq /= ffref;
diff --git a/src/s3_driver.c b/src/s3_driver.c
index a66f4a2..305b564 100644
--- a/src/s3_driver.c
+++ b/src/s3_driver.c
@@ -740,7 +740,7 @@ static Bool S3ScreenInit(SCREEN_INIT_ARGS_DECL)
 	ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 	S3Ptr pS3 = S3PTR(pScrn);
 	BoxRec ScreenArea;
-	int width, height, displayWidth;
+	int width, height;
 	
 	if (pS3->rotate) {
 		height = pScrn->virtualX;
@@ -788,10 +788,8 @@ static Bool S3ScreenInit(SCREEN_INIT_ARGS_DECL)
         if(pS3->shadowFB) {
         	pS3->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
         	pS3->ShadowPtr = malloc(pS3->ShadowPitch * height);
-		displayWidth = pS3->ShadowPitch / (pScrn->bitsPerPixel >> 3);
         } else {
         	pS3->ShadowPtr = NULL;
-		displayWidth = pScrn->displayWidth;
         }
         
         if (!fbScreenInit(pScreen, (pS3->shadowFB ? pS3->ShadowPtr : pS3->FBBase), 
-- 
2.7.4



More information about the xorg-devel mailing list