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/qa.h src/inc/qa.h
index 016db68..0f6a729 100644
--- src/inc/qa.h
+++ src/inc/qa.h
@@ -27,35 +27,43 @@
 /* Timing and other info about fetching a web page. */
     {
     struct qaStatus *next;
     int milliTime;	/* Time page fetch took. */
     char *errMessage;	/* Error message if any. */
     boolean hardError;	/* Crash of some sort. */
     };
 
 struct qaStatus *qaPageGet(char *url, struct htmlPage **retPage);
 /* Get info on given url, (and return page if retPage non-null). */
 
 struct qaStatus *qaPageFromForm(struct htmlPage *origPage, struct htmlForm *form, 
 	char *buttonName, char *buttonVal, struct htmlPage **retPage);
 /* Get update to form based on pressing a button. */
 
-void qaStatusSoftError(struct qaStatus *qs, char *format, ...);
+void qaStatusSoftError(struct qaStatus *qs, char *format, ...)
 /* Add error message for something less than a crash. */
+#if defined(__GNUC__)
+__attribute__((format(printf, 2, 3)))
+#endif
+;
 
-void qaStatusReportOne(FILE *f, struct qaStatus *qs, char *format, ...);
+void qaStatusReportOne(FILE *f, struct qaStatus *qs, char *format, ...)
 /* Report status */
+#if defined(__GNUC__)
+__attribute__((format(printf, 3, 4)))
+#endif
+;
 
 struct qaStatistics
 /* Stats on one set of tests. */
     {
     struct qaStatistics *next;
     int testCount;	/* Number of tests. */
     int softCount;	/* Soft error count. */
     int hardCount;	/* Hard error count. */
     long milliTotal;	/* Time tests took. */
     };
 
 void qaStatisticsAdd(struct qaStatistics *stats, struct qaStatus *qs);
 /* Add test results to totals */
 
 void qaStatisticsReport(struct qaStatistics *stats, char *label, FILE *f);