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

Kevin Brace kevinbrace at gmx.com
Mon Dec 17 21:30:20 UTC 2018


Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 src/sis_driver.c | 18 ++----------------
 src/sis_video.c  | 12 ++++++++++++
 2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index 31a7ada..d5ba1bd 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -6192,7 +6192,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
           Bool acceptcustommodes = TRUE;  /* Accept user modelines */
 	  Bool includelcdmodes   = TRUE;  /* Include modes reported by DDC */
 	  Bool isfordvi          = FALSE; /* Is for digital DVI output */
-	  Bool fakecrt2modes     = FALSE; /* Fake some modes for CRT2 */
 	  Bool IsForCRT2	 = FALSE;
 	  if(pSiS->UseVESA) {
 	     acceptcustommodes = FALSE;
@@ -6210,15 +6209,11 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 		      if(pSiS->VBFlags & (CRT2_TV|CRT2_LCD)) {
 		         acceptcustommodes = FALSE;
 		         includelcdmodes   = FALSE;
-			 fakecrt2modes = TRUE;
 		      }
 		   }
 		} else {
 		   acceptcustommodes = FALSE;
 		   includelcdmodes   = FALSE;
-		   if(pSiS->VBFlags & (CRT2_TV|CRT2_LCD)) {
-		      fakecrt2modes = TRUE;
-		   }
 		}
 		clockRanges->interlaceAllowed = FALSE;
 		IsForCRT2 = TRUE;
@@ -6227,7 +6222,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 		   if(!(pSiS->VBFlags2 & VB2_SISTMDSLCDABRIDGE)) {
 		      acceptcustommodes = FALSE;
 		      includelcdmodes   = FALSE;
-		      fakecrt2modes     = TRUE;
 		      /* Will handle i-lace in mode-switching code */
 		   } else {
 		      isfordvi = TRUE;
@@ -6246,7 +6240,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 	        if(!(pSiS->VBFlags2 & VB2_SISTMDSLCDABRIDGE)) {
 		   acceptcustommodes = FALSE;
 		   includelcdmodes   = FALSE;
-		   fakecrt2modes     = TRUE;
 		   /* Will handle i-lace in mode-switching code */
 		} else {
 		   isfordvi = TRUE;
@@ -6282,7 +6275,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 		   acceptcustommodes = FALSE;
 		   includelcdmodes   = FALSE;
 		   if(!(pSiS->VBFlags & DISPTYPE_CRT1)) {
-		      fakecrt2modes = TRUE;
 		      IsForCRT2 = TRUE;
 		   }
 		}
@@ -6291,7 +6283,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 	     acceptcustommodes = FALSE;
 	     includelcdmodes   = FALSE;
 	     if((pSiS->VBFlags & CRT1_LCDA) || (!(pSiS->VBFlags & DISPTYPE_CRT1))) {
-		fakecrt2modes = TRUE;
 		IsForCRT2 = TRUE;
 	     }
 	  } else {
@@ -6301,7 +6292,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 
 	  pSiS->HaveCustomModes = FALSE;
 	  if(SiSMakeOwnModeList(pScrn, acceptcustommodes, includelcdmodes,
-			isfordvi, &pSiS->HaveCustomModes, FALSE /*fakecrt2modes*/, IsForCRT2)) {
+			isfordvi, &pSiS->HaveCustomModes, FALSE, IsForCRT2)) {
 	     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		 "Replaced %s mode list with built-in modes\n",
 	     pSiS->HaveCustomModes ? "default" : "entire");
@@ -6621,7 +6612,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
        Bool acceptcustommodes = TRUE;
        Bool includelcdmodes   = TRUE;
        Bool isfordvi          = FALSE;
-       Bool fakecrt2modes     = FALSE;
 
        xf86DrvMsg(pScrn->scrnIndex, X_INFO, crtsetupstr, 2);
 
@@ -6649,20 +6639,16 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 	     if(pSiS->VBFlags & (CRT2_LCD|CRT2_TV)) {
 		includelcdmodes   = FALSE;
 		acceptcustommodes = FALSE;
-		fakecrt2modes     = TRUE;
 	     }
 	  }
        } else {
 	  includelcdmodes   = FALSE;
 	  acceptcustommodes = FALSE;
-	  if(pSiS->VBFlags & (CRT2_LCD|CRT2_TV)) {
-	     fakecrt2modes = TRUE;
-	  }
        }
 
        pSiS->HaveCustomModes2 = FALSE;
        if(!SiSMakeOwnModeList(pSiS->CRT2pScrn, acceptcustommodes, includelcdmodes,
-				isfordvi, &pSiS->HaveCustomModes2, FALSE /* fakecrt2modes */, TRUE )) {
+				isfordvi, &pSiS->HaveCustomModes2, FALSE, TRUE )) {
 
 	  SISErrorLog(pScrn, "Building list of built-in modes for CRT2 failed, %s\n",
 				mergeddisstr);
diff --git a/src/sis_video.c b/src/sis_video.c
index 9428426..3eeda5e 100644
--- a/src/sis_video.c
+++ b/src/sis_video.c
@@ -4212,7 +4212,11 @@ SISPutImageBlit(
    UChar  *ybased, *uvbased, packed;
    CARD16 *myuvbased;
    SiS_Packet12_YUV MyPacket;
+#if 0
+#ifdef SISMERGED
    Bool first;
+#endif
+#endif
 
    if(index >= NUM_BLIT_PORTS) return BadMatch;
 
@@ -4388,7 +4392,11 @@ SISPutImageBlit(
    }
 #endif
 
+#if 0
+#ifdef SISMERGED
    first = TRUE;
+#endif
+#endif
    while(nbox--) {
       left = pbox->x1;
       if(left >= drw_x + xoffset + width) goto mycont;
@@ -4477,7 +4485,11 @@ SISPutImageBlit(
 #if 0
       MyPacket.P12_Command &= ~(pPriv->VBlankTriggerCRT1 | pPriv->VBlankTriggerCRT2);
 #endif
+#if 0
+#ifdef SISMERGED
       first = FALSE;
+#endif
+#endif
 mycont:
       pbox++;
    }
-- 
2.7.4



More information about the xorg-devel mailing list