[PATCH xf86-video-sis 2/2] Elimination of many "variable set but not used" compilation warnings

Kevin Brace kevinbrace at gmx.com
Thu Jul 12 04:50:28 UTC 2018


Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 src/init.c         |  3 +--
 src/init301.c      | 10 ++--------
 src/sis310_accel.c |  4 +---
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/init.c b/src/init.c
index a232cb7..4f84b0c 100644
--- a/src/init.c
+++ b/src/init.c
@@ -2669,7 +2669,7 @@ static void
 SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
 		unsigned short ModeIdIndex, unsigned short RRTI)
 {
-   unsigned short data, infoflag = 0, modeflag, resindex;
+   unsigned short data, infoflag = 0, modeflag;
 #ifdef SIS315H
    unsigned char  *ROMAddr  = SiS_Pr->VirtualRomBase;
    unsigned short data2, data3;
@@ -2680,7 +2680,6 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
    if(SiS_Pr->UseCustomMode) {
       infoflag = SiS_Pr->CInfoFlag;
    } else {
-      resindex = SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
       if(ModeNo > 0x13) {
 	 infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag;
       }
diff --git a/src/init301.c b/src/init301.c
index ffa6eaa..e891037 100644
--- a/src/init301.c
+++ b/src/init301.c
@@ -2256,17 +2256,15 @@ SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned shor
 		unsigned short RefreshRateTableIndex)
 {
   unsigned short CRT2Index, VCLKIndex = 0, VCLKIndexGEN = 0, VCLKIndexGENCRT = 0;
-  unsigned short modeflag, resinfo, tempbx;
+  unsigned short resinfo, tempbx;
   const unsigned char *CHTVVCLKPtr = NULL;
 
   if(ModeNo <= 0x13) {
-     modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag;
      resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo;
      CRT2Index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
      VCLKIndexGEN = (SiS_GetRegByte((SiS_Pr->SiS_P3ca+0x02)) >> 2) & 0x03;
      VCLKIndexGENCRT = VCLKIndexGEN;
   } else {
-     modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
      resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
      CRT2Index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
      VCLKIndexGEN = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
@@ -7434,7 +7432,7 @@ SiS_ShiftXPos(struct SiS_Private *SiS_Pr, int shift)
 static void
 SiS_SetGroup4_C_ELV(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex)
 {
-   unsigned short temp, temp1, resinfo = 0;
+   unsigned short temp, temp1;
    unsigned char  *ROMAddr = SiS_Pr->VirtualRomBase;
 
    if(!(SiS_Pr->SiS_VBType & VB_SIS30xCLV)) return;
@@ -7446,10 +7444,6 @@ SiS_SetGroup4_C_ELV(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned
       if(!(ROMAddr[0x61] & 0x04)) return;
    }
 
-   if(ModeNo > 0x13) {
-      resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO;
-   }
-
    SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x3a,0x08);
    temp = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x3a);
    if(!(temp & 0x01)) {
diff --git a/src/sis310_accel.c b/src/sis310_accel.c
index 40b6941..85110d2 100644
--- a/src/sis310_accel.c
+++ b/src/sis310_accel.c
@@ -1874,7 +1874,7 @@ SiSUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst)
 	SISPtr pSiS = SISPTR(pScrn);
 	unsigned char *src, *dst;
 	int src_pitch = exaGetPixmapPitch(pSrc);
-	int dst_pitch, size, w, h, bytes;
+	int dst_pitch, size, w, h;
 
 	w = pSrc->drawable.width;
 
@@ -1907,8 +1907,6 @@ SiSUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst)
 	src_pitch = exaGetPixmapPitch(pSrc);
 	dst = pDst->devPrivate.ptr;
 
-	bytes = (src_pitch < dst_pitch) ? src_pitch : dst_pitch;
-
 	h = pSrc->drawable.height;
 
 	(pSiS->SyncAccel)(pScrn);
-- 
2.7.4



More information about the xorg-devel mailing list