c16e0fd269add9742cb48d26e4135f3047805f7c
tdreszer
  Mon Oct 10 10:51:04 2011 -0700
Minor change to protect variable for SUBTRACK_CONFIG only code.
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index cf1dad4..2d7277f 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -3989,52 +3989,53 @@
     preSorted = tdbRefSortPrioritiesFromCart(cart, &subtrackRefList); // preserves user's prev sort/drags
     printf("<TBODY class='%saltColors'>\n",(sortOrder != NULL ? "sortable " : "") );
     }
 else
     {
     slSort(&subtrackRefList, trackDbRefCmp);  // straight from trackDb.ra
     preSorted = TRUE;
     puts("<TBODY>");
     }
 
 // Finally the big "for loop" to list each subtrack as a table row.
 printf("\n<!-- ----- subtracks list ----- -->\n");
 for (subtrackRef = subtrackRefList; subtrackRef != NULL; subtrackRef = subtrackRef->next)
     {
     subtrack = subtrackRef->val;
-    int ix,ix2;
+    int ix;
 
     // Determine whether subtrack is checked, visible, configurable, has group membership, etc.
     int fourState = subtrackFourStateChecked(subtrack,cart);
     boolean checkedCB = fourStateChecked(fourState);
     boolean enabledCB = fourStateEnabled(fourState);
     boolean visibleCB = fourStateVisible(fourState);
     membership_t *membership = subgroupMembershipGet(subtrack);
     eCfgType cType = cfgNone;
     if (!tdbIsMultiTrack(parentTdb))  // MultiTracks never have configurable subtracks!
         cType = cfgTypeFromTdb(subtrack,FALSE);
     if (cType != cfgNone)
         {
     #ifdef SUBTRACK_CFG
         // Turn off configuring for certain track type or if explicitly turned off
         int cfgSubterack = configurableByPopup(subtrack,cType);
         if (cfgSubterack <= 0)
             cType = cfgNone;
         else if (membersForAll->members[dimV]) // subtrack only configurable if more than one subtrack in view
             {                                  // find "view" in subgroup membership: e.g. "signal"
             if (-1 != (ix = stringArrayIx(membersForAll->members[dimV]->groupTag, membership->subgroups, membership->count)))
-                {                              // find "signal" in set of all views
+                {
+                int ix2;                       // find "signal" in set of all views
                 if (-1 != (ix2 = stringArrayIx(membership->membership[ix], membersForAll->members[dimV]->tags, membersForAll->members[dimV]->count)))
                     {
                     if (membersForAll->members[dimV]->subtrackCount[ix2] < 2)
                         cType = cfgNone;
                     }
                 }
             }
         else if (slCount(subtrackRefList) < 2 && cfgTypeFromTdb(parentTdb,FALSE) != cfgNone)
             cType = cfgNone;  // don't bother if there is a single subtrack but the composite is configurable.
     #else///ifndef SUBTRACK_CFG
         if (trackDbSettingClosestToHomeOn(subtrack, "configurable") == FALSE)
             cType = cfgNone;
     #endif///ndef SUBTRACK_CFG
         }