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/wigMafTrack.c src/hg/hgTracks/wigMafTrack.c
index e163fa7..86d10aa 100644
--- src/hg/hgTracks/wigMafTrack.c
+++ src/hg/hgTracks/wigMafTrack.c
@@ -207,34 +207,30 @@
     else
 	{
     	speciesOrder = cartGetOrderFromFile(database, cart, speciesUseFile);
     	}
     speciesOff = NULL;
     }
 
 /* keep track of species configured off initially for track */
 if (speciesOff)
     {
     speciesOffCt = chopLine(cloneString(speciesOff), defaultOff);
     for (i = 0; i < speciesOffCt; i++)
         hashAdd(speciesOffHash, defaultOff[i], NULL);
     }
 
-char *prefix = track->track; // use when setting things to the cart
-if (tdbIsContainerChild(track->tdb))
-    prefix = tdbGetContainer(track->tdb)->track;
-
 /* Make up items for other organisms by scanning through group & species
    track settings */
 struct wigMafItem *mi = NULL, *miList = NULL;
 for (group = 0; group < groupCt; group++)
     {
     if (groupCt != 1 || !speciesOrder)
         {
         safef(sGroup, sizeof sGroup, "%s%s",
                                 SPECIES_GROUP_PREFIX, groups[group]);
         speciesOrder = trackDbRequiredSetting(track->tdb, sGroup);
         }
     speciesCt = chopLine(cloneString(speciesOrder), species);
     for (i = 0; i < speciesCt; i++)
         {
 	boolean defaultOn = (hashLookup(speciesOffHash, species[i]) == NULL);
@@ -1129,34 +1125,30 @@
 struct sqlConnection *conn;
 struct sqlResult *sr = NULL;
 char **row = NULL;
 int rowOffset = 0;
 struct mafSummary *ms, *summaryList;
 struct hash *componentHash = newHash(6);
 struct hashEl *hel;
 struct hashCookie cookie;
 struct dyString *where = dyStringNew(256);
 char *whereClause = NULL;
 boolean useIrowChains = TRUE;
 
 if (miList == NULL)
     return FALSE;
 
-char *prefix = track->track; // use when setting things to the cart
-if (tdbIsContainerChild(track->tdb))
-    prefix = tdbGetContainer(track->tdb)->track;
-
 /* get summary table name from trackDb */
 if ((summary = summarySetting(track)) == NULL)
     return FALSE;
 
 if (cartVarExistsAnyLevel(cart, track->tdb,FALSE,MAF_CHAIN_VAR))
     useIrowChains = cartUsualBooleanClosestToHome(cart, track->tdb, FALSE, MAF_CHAIN_VAR,TRUE);
 else
     {
     char *irowString = trackDbSetting(track->tdb, "irows");
     if (irowString && sameString(irowString, "off"))
 	useIrowChains = FALSE;
     }
 
 /* Create SQL where clause that will load up just the
  * summaries for the species that we are including. */
@@ -1352,34 +1344,30 @@
 static boolean drawPairsFromMultipleMaf(struct track *track,
         int seqStart, int seqEnd,
         struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font,
         Color color, enum trackVisibility vis)
 /* Draw pairwise display from maf of multiple alignment.
  * Extract pairwise alignments from maf and rescore.
  * This is used only when zoomed-in.
  */
 {
 struct wigMafItem *miList = track->items, *mi = miList;
 int graphHeight = 0;
 Color pairColor = (vis == tvFull ? track->ixAltColor : color);
 boolean useIrowChains = TRUE;
 boolean doSnpMode = (vis == tvPack) &&(trackDbSetting(track->tdb, "snpMode") != NULL);
 
-char *prefix = track->track; // use when setting things to the cart
-if (tdbIsContainerChild(track->tdb))
-    prefix = track->tdb->parent->track;
-
 struct mafPriv *mp = getMafPriv(track);
 if (miList == NULL || mp->list == NULL)
     return FALSE;
 
 if (cartVarExistsAnyLevel(cart, track->tdb,FALSE,MAF_CHAIN_VAR))
     useIrowChains = cartUsualBooleanClosestToHome(cart, track->tdb, FALSE, MAF_CHAIN_VAR,TRUE);
 else
     {
     char *irowString = trackDbSetting(track->tdb, "irows");
     if (irowString && sameString(irowString, "off"))
 	useIrowChains = FALSE;
     }
 
 if (vis == tvFull)
     graphHeight = pairwiseWigHeight(track);
@@ -1812,63 +1800,59 @@
 
 if (strand == '-')
     reverseBytes(dna, size);
 }
 
 static int wigMafDrawBases(struct track *track, int seqStart, int seqEnd,
         struct hvGfx *hvg, int xOff, int yOff, int width,
         MgFont *font, Color color, enum trackVisibility vis,
 	struct wigMafItem *miList)
 /* Draw base-by-base view, return new Y offset. */
 {
 struct wigMafItem *mi;
 struct mafAli *mafList, *maf, *sub;
 struct mafComp *mc, *mcMaster;
 int lineCount = slCount(miList);
-char **lines = NULL, *selfLine, *insertLine;
+char **lines = NULL, *selfLine;
 int *insertCounts;
 int i, x = xOff, y = yOff;
 struct dnaSeq *seq = NULL;
 struct hash *miHash = newHash(9);
 struct hash *srcHash = newHash(0);
 char dbChrom[64];
 int alignLineLength = winBaseCount * 2;
         /* doubled to allow space for insert counts */
 boolean complementBases = cartUsualBooleanDb(cart, database, COMPLEMENT_BASES_VAR, FALSE);
 bool dots = FALSE;         /* configuration option */
 /* this line must be longer than the longest base-level display */
 char noAlignment[2000];
 boolean useIrowChains = TRUE;
 int offset;
 char *framesTable = NULL;
 char *defaultCodonSpecies = cartUsualString(cart, SPECIES_CODON_DEFAULT, NULL);
 char *codonTransMode = NULL;
 boolean startSub2 = FALSE;
 
 int mafOrig = 0;
 int mafOrigOffset = 0;
 char query[256];
 struct mafPriv *mp = getMafPriv(track);
 char *mafFile = NULL;
 struct sqlConnection *conn2 = NULL;
 struct sqlConnection *conn3 = NULL;
 char *tableName = NULL;
 
-char *prefix = track->track; // use when setting things to the cart
-if (tdbIsContainerChild(track->tdb))
-    prefix = tdbGetContainer(track->tdb)->track;
-
 if (mp->ct != NULL)
     {
     conn2 = hAllocConn(CUSTOM_TRASH);
     conn3 = hAllocConn(CUSTOM_TRASH);
     tableName = mp->ct->dbTableName;
     mafFile = getCustomMafFile(track);
     }
 else
     {
     conn2 = hAllocConn(database);
     conn3 = hAllocConn(database);
     tableName = track->table;
     mafFile = getTrackMafFile(track);  // optional
     }
 
@@ -1940,31 +1924,30 @@
     char *irowString = trackDbSetting(track->tdb, "irows");
     if (irowString && sameString(irowString, "off"))
 	useIrowChains = FALSE;
     }
 
 /* Allocate a line of characters for each item. */
 AllocArray(lines, lineCount);
 lines[0] = needMem(alignLineLength);
 for (i=1; i<lineCount; ++i)
     {
     lines[i] = needMem(alignLineLength);
     memset(lines[i], ' ', alignLineLength - 1);
     }
 
 /* Give nice names to first two. */
-insertLine = lines[0];
 selfLine = lines[1];
 
 /* Allocate a line for recording gap sizes in reference */
 AllocArray(insertCounts, alignLineLength);
 
 /* Load up self-line with DNA */
 seq = hChromSeqMixed(database, chromName, seqStart , seqEnd);
 memcpy(selfLine, seq->dna, winBaseCount + 4);
 //toUpperN(selfLine, winBaseCount);
 freeDnaSeq(&seq);
 
 /* Make hash of species items keyed by database. */
 i = 0;
 for (mi = miList; mi != NULL; mi = mi->next)
     {