summaryrefslogtreecommitdiffstats
path: root/include/err.h
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-10-29 22:18:47 +0000
committerjdp <jdp@FreeBSD.org>1998-10-29 22:18:47 +0000
commit06db33418e15c767b0611847073324d65aeb6b5f (patch)
tree8cab928fff5f73b5c18112ed4713e764afc3426b /include/err.h
parent4046cc96fe94b352a6d6c1807396023d752d631b (diff)
downloadFreeBSD-src-06db33418e15c767b0611847073324d65aeb6b5f.zip
FreeBSD-src-06db33418e15c767b0611847073324d65aeb6b5f.tar.gz
Add support for -Wformat consistency checking between format strings
and their argument lists for the err(3) family of functions. Note, I intentionally used __printflike instead of __printf0like for warnx. Although a NULL format string is legal for that function, it doesn't make any sense.
Diffstat (limited to 'include/err.h')
-rw-r--r--include/err.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/err.h b/include/err.h
index a3464af..350bebd 100644
--- a/include/err.h
+++ b/include/err.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)err.h 8.1 (Berkeley) 6/2/93
- * $Id$
+ * $Id: err.h,v 1.5 1998/09/12 21:02:15 wollman Exp $
*/
#ifndef _ERR_H_
@@ -48,17 +48,17 @@
#include <sys/cdefs.h>
__BEGIN_DECLS
-void err __P((int, const char *, ...)) __dead2;
+void err __P((int, const char *, ...)) __printf0like(2, 3) __dead2;
void verr __P((int, const char *, _BSD_VA_LIST_)) __dead2;
-void errc __P((int, int, const char *, ...)) __dead2;
+void errc __P((int, int, const char *, ...)) __printf0like(3, 4) __dead2;
void verrc __P((int, int, const char *, _BSD_VA_LIST_)) __dead2;
-void errx __P((int, const char *, ...)) __dead2;
+void errx __P((int, const char *, ...)) __printf0like(2, 3) __dead2;
void verrx __P((int, const char *, _BSD_VA_LIST_)) __dead2;
-void warn __P((const char *, ...));
+void warn __P((const char *, ...)) __printf0like(1, 2);
void vwarn __P((const char *, _BSD_VA_LIST_));
-void warnc __P((int, const char *, ...));
+void warnc __P((int, const char *, ...)) __printf0like(2, 3);
void vwarnc __P((int, const char *, _BSD_VA_LIST_));
-void warnx __P((const char *, ...));
+void warnx __P((const char *, ...)) __printflike(1, 2);
void vwarnx __P((const char *, _BSD_VA_LIST_));
void err_set_file __P((void *));
void err_set_exit __P((void (*)(int)));
OpenPOWER on IntegriCloud