From: benno Date: Mon, 18 Jul 2016 21:17:32 +0000 (+0000) Subject: add format attributes to log functions X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9af5cc2faab4f7c797e14da46f184015b5910d9d;p=openbsd add format attributes to log functions ok stsp@ claudio@ florian@ --- 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)));