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.
This commit is contained in:
John Polstra 1998-10-29 22:18:47 +00:00
parent 30af884929
commit 7fd62c59f5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40739

View File

@ -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)));