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/inc/common.h src/inc/common.h
index 960b0c2..551122d 100644
--- src/inc/common.h
+++ src/inc/common.h
@@ -1386,33 +1386,37 @@
 char *naForNull(char *s);
 /* Return 'n/a' if s is NULL, otherwise s. */
 
 char *naForEmpty(char *s);
 /* Return n/a if s is "" or NULL, otherwise s. */
 
 char *emptyForNull(char *s);
 /* Return "" if s is NULL, otherwise s. */
 
 char *nullIfAllSpace(char *s);
 /* Return NULL if s is all spaces, otherwise s. */
 
 char *trueFalseString(boolean b);
 /* Return "true" or "false" */
 
-void uglyTime(char *label, ...);
+void uglyTime(char *label, ...)
 /* Print label and how long it's been since last call.  Call with
  * a NULL label to initialize. */
+#if defined(__GNUC__)
+__attribute__((format(printf, 1, 2)))
+#endif
+;
 
 /*	In case the development environment does not supply INFINITY	*/
 #if !defined(INFINITY)
 #define INFINITY (1.0/0.0)
 #endif
 
 void makeDirs(char* path);
 /* make a directory, including parent directories */
 
 boolean isNumericString(char *s);
 /* Return TRUE if string is numeric (integer or floating point) */
 
 char *skipNumeric(char *s);
 /* Return first char of s that's not a digit */