ccbc28ce544f211af1ee48e0831da67851c6c672 kate Fri Apr 14 15:45:24 2017 -0700 Fix compiler warning from build. diff --git src/hg/lib/barChartUi.c src/hg/lib/barChartUi.c index ac8161a..49cdb59 100644 --- src/hg/lib/barChartUi.c +++ src/hg/lib/barChartUi.c @@ -166,35 +166,33 @@ * TODO: Consider removing table code */ { struct barChartCategory *categs = NULL; char *words[BAR_CHART_MAX_CATEGORIES]; char *colorWords[BAR_CHART_MAX_CATEGORIES]; char *labels = trackDbSettingClosestToHome(tdb, BAR_CHART_CATEGORY_LABELS); char *colors = trackDbSettingClosestToHome(tdb, BAR_CHART_CATEGORY_COLORS); struct barChartCategory *categ = NULL; if (labels == NULL) { categs = barChartGetCategories(database, tdb->table); } else { - struct rgbColor *rainbow = NULL; int count = chopLine(cloneString(labels), words); - if (colors == NULL) - rainbow = getRainbow(&saturatedRainbowAtPos, count); - else + struct rgbColor *rainbow = getRainbow(&saturatedRainbowAtPos, count); + if (colors != NULL) { int colorCount = chopLine(cloneString(colors), colorWords); if (colorCount != count) warn("barChart track %s mismatch between label (%d) and color (%d) settings", tdb->track, count, colorCount); } int i; char buf[6]; for (i=0; i<count; i++) { AllocVar(categ); categ->id = i; safef(buf, sizeof buf, "%d", i); categ->name = cloneString(buf); categ->label = words[i];