diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2016-10-16 09:35:41 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2016-10-16 09:35:41 +0000 |
commit | a9d7e6fe079bbf46eefd5eaa866472609899499c (patch) | |
tree | c7df70e7664d1142d43c6aff88e95553765fb0cb /usr.sbin/config/config.h | |
parent | 187a6344e8079dbfeafbc650f3f35db527f4d77c (diff) |
Add printf format attributes to the custom error functions.
ok natano
Diffstat (limited to 'usr.sbin/config/config.h')
-rw-r--r-- | usr.sbin/config/config.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h index 41aafc8fd17..b1802949710 100644 --- a/usr.sbin/config/config.h +++ b/usr.sbin/config/config.h @@ -1,4 +1,4 @@ -/* $OpenBSD: config.h,v 1.28 2015/01/16 06:40:16 deraadt Exp $ */ +/* $OpenBSD: config.h,v 1.29 2016/10/16 09:35:40 tb Exp $ */ /* $NetBSD: config.h,v 1.30 1997/02/02 21:12:30 thorpej Exp $ */ /* @@ -368,9 +368,12 @@ void *emalloc(size_t); void *ereallocarray(void *, size_t, size_t); void *ecalloc(size_t, size_t); char *sourcepath(const char *); -void error(const char *, ...); /* immediate errs */ -void xerror(const char *, int, const char *, ...); /* delayed errs */ -__dead void panic(const char *, ...); +void error(const char *, ...) /* immediate errs */ + __attribute__((__format__ (printf, 1, 2))); +void xerror(const char *, int, const char *, ...) /* delayed errs */ + __attribute__((__format__ (printf, 3, 4))); +__dead void panic(const char *, ...) + __attribute__((__format__ (printf, 1, 2))); struct nvlist *newnv(const char *, const char *, void *, int, struct nvlist *); void nvfree(struct nvlist *); void nvfreel(struct nvlist *); |