5a4323ed4e7fc1bf46bd2448cecf498cf6585783 max Tue Jan 8 07:18:19 2019 -0800 fixing gcc7 warn as per Hiram email, no redmine diff --git src/hg/hgTracks/pubsTracks.c src/hg/hgTracks/pubsTracks.c index ea66ee8..943b9c4 100644 --- src/hg/hgTracks/pubsTracks.c +++ src/hg/hgTracks/pubsTracks.c @@ -22,37 +22,38 @@ if (isEmpty(articleTable)) { char buf[256]; safef(buf, sizeof(buf), "%sArticle", tg->track); articleTable = cloneString(buf); } return articleTable; } static char *makeMysqlMatchStr(char *str) { // return a string with all words prefixed with a '+' to force a boolean AND query; // we also strip leading/trailing spaces. char *matchStr = needMem(strlen(str) * 2 + 1); int i = 0; -for(;*str && isspace(*str);str++) - ; while(*str) +for(;*str && isspace(*str);str++) // skip initial whitespace + ; +while(*str) { matchStr[i++] = '+'; - for(; *str && !isspace(*str);str++) + for(; *str && !isspace(*str);str++) // copy next word matchStr[i++] = *str; - for(;*str && isspace(*str);str++) + for(;*str && isspace(*str);str++) // skip over white space ; } matchStr[i++] = 0; return matchStr; } struct pubsExtra /* additional info needed for publication blat linked features: author+year and title */ { char *label; // usually author+year char *mouseOver; // usually title of article char *class; // class of article, usually a curated database // color depends on cart settings, either based on topic, impact or year // support to ways to color: either by shade (year, impact) or directly with rgb values int shade; // year or impact are shades which we can't resolve to rgb easily