diff options
author | 2016-07-18 21:17:32 +0000 | |
---|---|---|
committer | 2016-07-18 21:17:32 +0000 | |
commit | 9af5cc2faab4f7c797e14da46f184015b5910d9d (patch) | |
tree | bd5c532de30fda65313bb1b964fb29d4a48daedb | |
parent | add format attributes to log functions and fix two errors (diff) | |
download | wireguard-openbsd-9af5cc2faab4f7c797e14da46f184015b5910d9d.tar.xz wireguard-openbsd-9af5cc2faab4f7c797e14da46f184015b5910d9d.zip |
add format attributes to log functions
ok stsp@ claudio@ florian@
-rw-r--r-- | usr.sbin/ifstated/ifstated.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/usr.sbin/ifstated/ifstated.h b/usr.sbin/ifstated/ifstated.h index de32109e0ef..8eeb0b0a74f 100644 --- a/usr.sbin/ifstated/ifstated.h +++ b/usr.sbin/ifstated/ifstated.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ifstated.h,v 1.8 2014/11/03 18:44:36 bluhm Exp $ */ +/* $OpenBSD: ifstated.h,v 1.9 2016/07/18 21:17:32 benno Exp $ */ /* * Copyright (c) 2004 Ryan McBride @@ -138,11 +138,19 @@ void clear_config(struct ifsd_config *); /* log.c */ void log_init(int); -void log_warn(const char *, ...); -void log_warnx(const char *, ...); -void log_info(const char *, ...); -void log_debug(const char *, ...); -void vlog(int, const char *, va_list); -void logit(int, const char *, ...); -__dead void fatal(const char *); -__dead void fatalx(const char *); +void log_warn(const char *, ...) + __attribute__((__format__ (printf, 1, 2))); +void log_warnx(const char *, ...) + __attribute__((__format__ (printf, 1, 2))); +void log_info(const char *, ...) + __attribute__((__format__ (printf, 1, 2))); +void log_debug(const char *, ...) + __attribute__((__format__ (printf, 1, 2))); +void vlog(int, const char *, va_list) + __attribute__((__format__ (printf, 2, 0))); +void logit(int, const char *, ...) + __attribute__((__format__ (printf, 2, 3))); +void fatal(const char *) __dead + __attribute__((__format__ (printf, 1, 0))); +void fatalx(const char *) __dead + __attribute__((__format__ (printf, 1, 0))); |