diff options
author | 2016-06-06 15:56:22 +0000 | |
---|---|---|
committer | 2016-06-06 15:56:22 +0000 | |
commit | 30f31fecfa98adfcd7dc5298f5742466c7cf9698 (patch) | |
tree | c118b1e845e0b28f28f1f85b6f14a059dee9fd77 | |
parent | Speed up session establishment after config reload. (diff) | |
download | wireguard-openbsd-30f31fecfa98adfcd7dc5298f5742466c7cf9698.tar.xz wireguard-openbsd-30f31fecfa98adfcd7dc5298f5742466c7cf9698.zip |
add format attributes to the proper functions and then fix the
warning in rde.c
ok stsp@
-rw-r--r-- | usr.sbin/ospfd/log.h | 26 | ||||
-rw-r--r-- | usr.sbin/ospfd/rde.c | 6 |
2 files changed, 20 insertions, 12 deletions
diff --git a/usr.sbin/ospfd/log.h b/usr.sbin/ospfd/log.h index e0034e80324..656afd86a87 100644 --- a/usr.sbin/ospfd/log.h +++ b/usr.sbin/ospfd/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.6 2014/11/03 07:40:31 bluhm Exp $ */ +/* $OpenBSD: log.h,v 1.7 2016/06/06 15:56:22 benno Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -23,13 +23,21 @@ void log_init(int); void log_verbose(int); -void logit(int, const char *, ...); -void vlog(int, const char *, va_list); -void log_warn(const char *, ...); -void log_warnx(const char *, ...); -void log_info(const char *, ...); -void log_debug(const char *, ...); -void fatal(const char *) __dead; -void fatalx(const char *) __dead; +void logit(int, const char *, ...) + __attribute__((__format__ (printf, 2, 3))); +void vlog(int, const char *, va_list) + __attribute__((__format__ (printf, 2, 0))); +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 fatal(const char *) __dead + __attribute__((__format__ (printf, 1, 0))); +void fatalx(const char *) __dead + __attribute__((__format__ (printf, 1, 0))); #endif /* _LOG_H_ */ diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c index 6d53eb3a953..3d2c9ae7fea 100644 --- a/usr.sbin/ospfd/rde.c +++ b/usr.sbin/ospfd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.100 2015/12/05 12:20:13 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.101 2016/06/06 15:56:22 benno Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -374,7 +374,7 @@ rde_dispatch_imsg(int fd, short event, void *bula) } } if (l != 0 && !error) - log_warnx("rde_dispatch_imsg: peerid %lu, " + log_warnx("rde_dispatch_imsg: peerid %u, " "trailing garbage in Database Description " "packet", imsg.hdr.peerid); @@ -411,7 +411,7 @@ rde_dispatch_imsg(int fd, short event, void *bula) ntohs(v->lsa->hdr.len)); } if (l != 0) - log_warnx("rde_dispatch_imsg: peerid %lu, " + log_warnx("rde_dispatch_imsg: peerid %u, " "trailing garbage in LS Request " "packet", imsg.hdr.peerid); break; |