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/lib/web.c src/hg/lib/web.c
index f8c8594..efdf7de 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -452,31 +452,31 @@
 
 boolean webGotWarnings()
 /* Return TRUE if webVaWarn has been called. */
 {
 return gotWarnings;
 }
 
 void webAbort(char* title, char* format, ...)
 /* an abort function that outputs a error page */
 {
 va_list args;
 va_start(args, format);
 
 /* output the header */
 if(!webHeadAlreadyOutputed)
-    webStart(errCart, NULL, title);
+    webStart(errCart, NULL, "%s", title);
 
 /* in text mode, have a different error */
 if(webInTextMode)
 	printf("\n\n\n          %s\n\n", title);
 
 vprintf(format, args);
 printf("<!-- HGERROR -->\n");
 printf("\n\n");
 
 webEnd();
 
 va_end(args);
 exit(0);
 }
 
@@ -1322,31 +1322,31 @@
     stripRegEx(menuStr, "<\\!-- LOGIN_START -->.*<\\!-- LOGIN_END -->", REG_ICASE);
 
 if(scriptName)
     {  // Provide optional official mirror servers menu items
     char *geoMenu = geoMirrorMenu();
     char *pattern = "<!-- OPTIONAL_MIRROR_MENU -->";
     char *newMenuStr = replaceChars(menuStr, pattern, geoMenu);
     freez(&menuStr);
     menuStr = newMenuStr;
     }
 
 
 if(scriptName)
     {
     // Provide view menu for some CGIs.
-    struct dyString *viewItems = dyStringCreate("");
+    struct dyString *viewItems = dyStringCreate("%s","");
     boolean hasViewMenu = TRUE;
     if (endsWith(scriptName, "hgGenome"))
         {
 	safef(buf, sizeof(buf), "../cgi-bin/hgGenome?%s&hgGenome_doPsOutput=1", uiVars);
     	dyStringPrintf(viewItems, "<li><a href='%s' id='%s'>%s</a></li>\n", buf, "pdfLink", "PDF/PS");
         }
     else
 	{
 	hasViewMenu = FALSE;
 	}
     if (hasViewMenu)
 	{
 	struct dyString *viewMenu = dyStringCreate("<li class='menuparent' id='view'><span>View</span>\n<ul style='display: none; visibility: hidden;'>\n");
 	dyStringAppend(viewMenu, viewItems->string);
 	dyStringAppend(viewMenu, "</ul>\n</li>\n");