e685265dd1b666acaab2bc076c141c368fb4be66
hiram
  Thu Oct 15 11:36:17 2015 -0700
fixup gcc warnings for -Wunused-but-set-variable refs #16121

diff --git src/hg/hgTracks/snakeTrack.c src/hg/hgTracks/snakeTrack.c
index 13b3ac7..65981a9 100644
--- src/hg/hgTracks/snakeTrack.c
+++ src/hg/hgTracks/snakeTrack.c
@@ -235,35 +235,35 @@
     }
 }
 
 static void initializeFullLevels(struct snakeFeature *sfList)
 /* initialize levels for compact snakes */
 {
 int ii;
 
 for(ii=0; ii <= maxLevel; ii++)
     {
     Levels[ii].connectsToLevel = needMem((maxLevel+1) * sizeof(unsigned));
     Levels[ii].pixels = bitAlloc(insideWidth);
     Levels[ii].blocks = NULL;
     }
 
-struct snakeFeature *sf, *prev = NULL, *next;
+struct snakeFeature *sf, *next;
 int prevLevel = -1;
 double scale = scaleForWindow(insideWidth, winStart, winEnd);
 
-for(sf=sfList; sf; prev = sf, sf = next)
+for(sf=sfList; sf; sf = next)
     {
     next = sf->next;
 
     if (positiveRangeIntersection(sf->start, sf->end, winStart, winEnd))
 	{
 	int sClp = (sf->start < winStart) ? winStart : sf->start;
 	sf->pixX1 = round((sClp - winStart)*scale);
 	int eClp = (sf->end > winEnd) ? winEnd : sf->end;
 	sf->pixX2 = round((eClp - winStart)*scale);
 	}
     else
 	{
 	sf->pixX1 = sf->pixX2 = 0;
 	}
 
@@ -866,56 +866,52 @@
 	    int x1 = round((sClp - winStart)*scale) + xOff;
 	    int x2 = round((eClp - winStart)*scale) + xOff;
 	    hvGfxBox(hvg, x1, y , x2-x1, DUP_LINE_HEIGHT - 1 , color);
 	    }
 	}
     y+=DUP_LINE_HEIGHT;
     }
 
 // now we're going to draw the boxes
 
 s = sf->start;
 int lastE = -1;
 int lastS = -1;
 int offY = y;
 int lineHeight = tg->lineHeight ;
-int tStart, tEnd, qStart;
 int  qs, qe;
 int heightPer = tg->heightPer;
-int lastX = -1,lastY = y;
+int lastX = -1;
 int lastQEnd = 0;
 int lastLevel = -1;
 int e;
 qe = lastQEnd = 0;
 for (sf =  (struct snakeFeature *)lf->components; sf != NULL; lastQEnd = qe, prevSf = sf, sf = sf->next)
     {
     qs = sf->qStart;
     qe = sf->qEnd;
     if (vis == tvDense)
 	y = offY;
     else if ((vis == tvPack) || (vis == tvSquish))
 	y = offY + (sf->level * 1) * lineHeight;
     else if (vis == tvFull)
 	y = offY + (sf->level * 2) * lineHeight;
     s = sf->start; e = sf->end;
-    tEnd = sf->end;
-    int osx;
 
-    int sx, ex;
+    int sx=0, ex;
     if (!positiveRangeIntersection(winStart, winEnd, s, e))
 	continue;
-    osx = sx = round((double)((int)s-winStart)*scale) + xOff;
     ex = round((double)((int)e-winStart)*scale) + xOff;
 
     // color by strand
     static Color darkBlueColor = 0;
     static Color darkRedColor = 0;
     if (darkRedColor == 0)
 	{
 	//the light blue: rgb(149, 204, 252)
 	//the light red: rgb(232, 156, 156)
 	darkRedColor = hvGfxFindColorIx(hvg, 232,156,156);
 	darkBlueColor = hvGfxFindColorIx(hvg, 149,204,252);
 	}
     
     char *colorBy = cartOrTdbString(cart, tg->tdb, 
 	SNAKE_COLOR_BY, SNAKE_DEFAULT_COLOR_BY);
@@ -1029,44 +1025,40 @@
 		}
 	    }
 
 	// if we're zoomed to base level, draw sequence of mismatch
 	if (zoomedToBaseLevel)
 	    {
 	    int mysx = round((double)((int)s-winStart)*scale) + xOff;
 	    int myex = round((double)((int)e-winStart)*scale) + xOff;
 	    int myw = myex - mysx;
 	    spreadAlignString(hvg, mysx, y, myw, heightPer, MG_WHITE, font, ourDna,
 		refDna, seqLen, TRUE, FALSE);
 	    }
 
 	}
     sf->drawn = TRUE;
-    tEnd = e;
-    tStart = s;
-    qStart = sf->qStart;
-    lastY = y;
     lastLevel = sf->level;
     //lastX = x;
     }
 
 if (vis != tvFull)
     return;
 
 // now we're going to draw the lines between the blocks
 
-lastX = -1,lastY = y;
+lastX = -1;
 lastQEnd = 0;
 lastLevel = 0;
 qe = lastQEnd = 0;
 prevSf = NULL;
 for (sf =  (struct snakeFeature *)lf->components; sf != NULL; lastQEnd = qe, prevSf = sf, sf = sf->next)
     {
     int y1, y2;
     int sx, ex;
     qs = sf->qStart;
     qe = sf->qEnd;
     if (lastLevel == sf->level)
 	{
 	y1 = offY + (lastLevel * 2) * lineHeight + lineHeight/2;
 	y2 = offY + (sf->level * 2) * lineHeight + lineHeight/2;
 	}
@@ -1162,33 +1154,30 @@
 		    hvGfxLine(hvg, ex, y2, ex, y2 + lineHeight , color);
 		    boundMapBox(hvg, s, e, ex-1, y2, 2, lineHeight , tg->track,
 				"", buffer, NULL, TRUE, NULL);
 		    }
 		else
 		    {
 		    hvGfxLine(hvg, lastX-1, y1, sx, y2, color);
 		    hvGfxLine(hvg, sx, y2, sx, y2 + lineHeight , color);
 		    boundMapBox(hvg, s, e, sx-1, y2, 2, lineHeight , tg->track,
 				"", buffer, NULL, TRUE, NULL);
 
 		    }
 		}
 	    }
 	}
-    tEnd = e;
-    tStart = s;
-    qStart = sf->qStart;
     if (sf->orientation == -1)
 	lastX = sx;
     else
 	lastX = ex;
     lastS = s;
     lastE = e;
     lastLevel = sf->level;
     lastQEnd = qe;
     }
 }
 
 void halSnakeLoadItems(struct track *tg)
 // load up a snake from a HAL file.   This code is called in threads
 // so *no* use of globals please. All but full snakes are read into a single
 // linked feature.