From 06db33418e15c767b0611847073324d65aeb6b5f Mon Sep 17 00:00:00 2001 From: jdp Date: Thu, 29 Oct 1998 22:18:47 +0000 Subject: 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. --- include/err.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include') 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 __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))); -- cgit v1.1