0999158088e0fb3715eb27703c8c4f7123d77144 galt Mon Sep 21 16:51:20 2015 -0700 added GNU-C attributes to function declarations in src/inc, src/hg/inc, and some CGIs so that the compiler can catch errors where the parameter list given by the user does not match their format string. These var-args functions are like printf. diff --git src/hg/hgc/regMotif.c src/hg/hgc/regMotif.c index 14b9bc23..b089c35 100644 --- src/hg/hgc/regMotif.c +++ src/hg/hgc/regMotif.c @@ -158,31 +158,31 @@ printf(""); } void motifMultipleHitsSection(struct dnaSeq **seqs, int count, struct dnaMotif *motif, char *title) /* Print out section about motif, possibly with mutliple occurrences. */ { // Detect inconsistent motif/pwm tables and suppress confusing display if (motif != NULL) { if (seqs != NULL && motif->columnCount != seqs[0]->size) { warn("Motif seq length doesn't match PWM\n"); return; } } -webNewSection(title); +webNewSection("%s",title); motifLogoAndMatrix(seqs, count, motif); } void motifHitSection(struct dnaSeq *seq, struct dnaMotif *motif) /* Print out section about motif. */ { static char *title = "Motif Sequence"; if(seq == NULL) motifMultipleHitsSection(NULL, 0, motif, title); else motifMultipleHitsSection(&seq, 1, motif, title); } void doTriangle(struct trackDb *tdb, char *item, char *motifTable) /* Display detailed info on a regulatory triangle item. */ @@ -258,31 +258,31 @@ printf("\" TARGET=_BLANK>%d
\n", fr.pmid); bedPrintPos((struct bed *)(&fr), 3, tdb); if (hTableExists(database, motifTable)) { motif = loadDnaMotif(item, motifTable); if (motif != NULL) motifHitSection(NULL, motif); } } else errAbort("query returned no results: \"%s\"", query->string); dyStringFree(&query); sqlFreeResult(&sr); hFreeConn(&conn); if (motif != NULL) - webNewSection(tdb->longLabel); + webNewSection("%s",tdb->longLabel); printTrackHtml(tdb); } static void wrapHgGeneLink(struct sqlConnection *conn, char *name, char *label, char *geneTable) /* Wrap label with link to hgGene if possible. */ { char query[256]; struct sqlResult *sr; char **row; int rowOffset = hOffsetPastBin(database, seqName, "sgdGene"); sqlSafef(query, sizeof(query), "select * from %s where name = '%s'", geneTable, name); sr = sqlGetResult(conn, query);