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/hgTables/hgTables.h src/hg/hgTables/hgTables.h
index 1a231ff..7eb4235 100644
--- src/hg/hgTables/hgTables.h
+++ src/hg/hgTables/hgTables.h
@@ -44,32 +44,36 @@
 extern char *curTable;	/* Current selected table. */
 struct joiner *allJoiner;	/* Info on how to join tables. */
 
 #define GALAXY_URL_BASE "https://usegalaxy.org"
 #define GALAXY_URL_APP GALAXY_URL_BASE "/tool_runner"
 
 /* --------------- HTML Helpers ----------------- */
 
 void hPrintSpaces(int count);
 /* Print a number of non-breaking spaces. */
 
 void writeHtmlCell(char *text);
 /* Write out a cell in an HTML table, making text not too big,
  * and stripping html tags and breaking spaces.... */
 
-void htmlOpen(char *format, ...);
+void htmlOpen(char *format, ...)
 /* Start up a page that will be in html format. */
+#if defined(__GNUC__)
+__attribute__((format(printf, 1, 2)))
+#endif
+;
 
 void htmlClose();
 /* Close down html format page. */
 
 void textOpen();
 /* Start up page in text format. (No need to close this). */
 
 void explainWhyNoResults(FILE *f);
 /* Put up a little explanation to user of why they got nothing. */
 
 char *curTableLabel();
 /* Return label for current table - track short label if it's a track,
  * otherwise track name. */
 
 char *getScriptName();