diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2016-06-06 15:59:11 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2016-06-06 15:59:11 +0000 |
commit | d15aa21b537fbe7c21fa4add74e8196d5e3c6b8f (patch) | |
tree | 5674f6d7f4451b0b9870d0bac936245406636644 /usr.sbin/bgpd/bgpd.h | |
parent | 337e7f793336842ab15a256a96bd327258835ae4 (diff) |
Add format attributes to the proper functions and then fix the warning in
session.c
ok mpi@
Diffstat (limited to 'usr.sbin/bgpd/bgpd.h')
-rw-r--r-- | usr.sbin/bgpd/bgpd.h | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index 5fa046e1a88..3dc70d8dc0d 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.293 2016/06/03 17:36:37 benno Exp $ */ +/* $OpenBSD: bgpd.h,v 1.294 2016/06/06 15:59:10 benno Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -989,16 +989,26 @@ struct in6_addr *prefixlen2mask6(u_int8_t prefixlen); /* log.c */ void log_init(int); void log_verbose(int); -void logit(int, const char *, ...); -void vlog(int, const char *, va_list); -void log_peer_warn(const struct peer_config *, const char *, ...); -void log_peer_warnx(const struct peer_config *, const char *, ...); -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_peer_warn(const struct peer_config *, const char *, ...) + __attribute__((__format__ (printf, 2, 3))); +void log_peer_warnx(const struct peer_config *, const char *, ...) + __attribute__((__format__ (printf, 2, 3))); +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, 2))); +void fatalx(const char *) __dead + __attribute__((__format__ (printf, 1, 0))); /* mrt.c */ void mrt_clear_seq(void); |