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/hgGene/hgGene.c src/hg/hgGene/hgGene.c
index 333ba6b..fedd0bf 100644
--- src/hg/hgGene/hgGene.c
+++ src/hg/hgGene/hgGene.c
@@ -486,31 +486,31 @@
struct section *section;
for (section = sectionList; section != NULL; section = section->next)
{
char *closeVarName = sectionCloseVar(section->name);
boolean isOpen = !(cartUsualInt(cart, closeVarName, 0));
char *otherState = (isOpen ? "1" : "0");
char *indicator = (isOpen ? "-" : "+");
char *indicatorImg = (isOpen ? "../images/remove.gif" : "../images/add.gif");
struct dyString *header = dyStringNew(0);
//keep the following line for future debugging need
//printf("
printing %s section\n", section->name);fflush(stdout);
dyStringPrintf(header, "", section->name);
dyStringPrintf(header, "
",
geneCgi, cartSidUrlString(cart), closeVarName, otherState, section->name, indicatorImg, indicator);
dyStringAppend(header, section->longLabel);
- webNewSection(header->string);
+ webNewSection("%s",header->string);
if (isOpen)
{
section->print(section, conn, geneId);
}
else
{
printf("Press \"+\" in the title bar above to open this section.");
}
dyStringFree(&header);
}
}
void webMain(struct sqlConnection *conn)
/* Set up fancy web page with hotlinks bar and
* sections. */