err: add _PRINTF tags
authorMarko Kreen <markokr@gmail.com>
Thu, 24 Feb 2011 11:36:24 +0000 (13:36 +0200)
committerMarko Kreen <markokr@gmail.com>
Thu, 24 Feb 2011 20:04:18 +0000 (22:04 +0200)
usual/err.h

index c95c210969b8eba45533c3d5cc306673ef2712dc..2257288d14e1b33e56c1b083313b419785e251af 100644 (file)
 
 #ifndef HAVE_ERR
 /** Print formatted message and strerror(errno) to stderr and exit with given error code */
-void err(int e, const char *fmt, ...);
+void err(int e, const char *fmt, ...) _PRINTF(2, 3);
 #endif
 #ifndef HAVE_ERRX
 /** Print formatted message to stderr and exit with given error code */
-void errx(int e, const char *fmt, ...);
+void errx(int e, const char *fmt, ...) _PRINTF(2, 3);
 #endif
 #ifndef HAVE_WARN
 /** Print formatted message and strerror(errno) to stderr */
-void warn(const char *fmt, ...);
+void warn(const char *fmt, ...)  _PRINTF(1, 2);
 #endif
 #ifndef HAVE_WARNX
 /** Print formatted message to stderr */
-void warnx(const char *fmt, ...);
+void warnx(const char *fmt, ...)  _PRINTF(1, 2);
 #endif
 #ifndef HAVE_SETPROGNAME
 /** Set program name to that will printed as prefix to error messages */