d413e4be5a45462124c223caec3f9358fe6f30b8
hiram
  Thu Oct 15 11:42:29 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 65981a9..8b3a9a7 100644
--- src/hg/hgTracks/snakeTrack.c
+++ src/hg/hgTracks/snakeTrack.c
@@ -885,33 +885,34 @@
 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;
 
-    int sx=0, ex;
+    int sx, ex;
     if (!positiveRangeIntersection(winStart, winEnd, s, e))
 	continue;
+    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);