summaryrefslogtreecommitdiffstats
path: root/sys/sys/syslog.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-13 06:45:23 +0000
committerbde <bde@FreeBSD.org>1998-07-13 06:45:23 +0000
commitbf1a9b4c37da22da57d630c9aa1c79e91d310760 (patch)
treea292d667b70115407503c223922b78d70342669a /sys/sys/syslog.h
parent6d974eef922ca8150f05ea068cf2b04efd9d5258 (diff)
downloadFreeBSD-src-bf1a9b4c37da22da57d630c9aa1c79e91d310760.zip
FreeBSD-src-bf1a9b4c37da22da57d630c9aa1c79e91d310760.tar.gz
Added macros __printflike() and __scanflike() to <sys/cdefs.h>.
Use them to `make gcc -Wformat' check formats for all printf-like and scanf-like functions in /usr/src except for the err()/warn() family. err() isn't quite printf-like since its format arg can legitimately be NULL. syslog() isn't quite printf-like, but gcc already accepts %m, even for plain printf() when it shouldn't.
Diffstat (limited to 'sys/sys/syslog.h')
-rw-r--r--sys/sys/syslog.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/syslog.h b/sys/sys/syslog.h
index 309b6f7..61e3f2c 100644
--- a/sys/sys/syslog.h
+++ b/sys/sys/syslog.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)syslog.h 8.1 (Berkeley) 6/2/93
- * $Id: syslog.h,v 1.14 1997/10/06 18:20:23 joerg Exp $
+ * $Id: syslog.h,v 1.15 1997/10/06 20:37:01 joerg Exp $
*/
#ifndef _SYS_SYSLOG_H_
@@ -192,8 +192,8 @@ __BEGIN_DECLS
void closelog __P((void));
void openlog __P((const char *, int, int));
int setlogmask __P((int));
-void syslog __P((int, const char *, ...));
-void vsyslog __P((int, const char *, _BSD_VA_LIST_));
+void syslog __P((int, const char *, ...)) __printflike(2, 3);
+void vsyslog __P((int, const char *, _BSD_VA_LIST_)) __printflike(2, 0);
__END_DECLS
#endif /* !KERNEL */
OpenPOWER on IntegriCloud