aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/syslog.h
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-07-13 06:45:23 +0000
committerBruce Evans <bde@FreeBSD.org>1998-07-13 06:45:23 +0000
commit748993b899a7e36387ff56306b9abdb34e9643f5 (patch)
treef7dcf65aab82754d2478b110f672c7507c3bdded /sys/sys/syslog.h
parenteaaeb9f30cc3f373d8628ac4256678577955d1f5 (diff)
downloadsrc-748993b899a7e36387ff56306b9abdb34e9643f5.tar.gz
src-748993b899a7e36387ff56306b9abdb34e9643f5.zip
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.
Notes
Notes: svn path=/head/; revision=37614
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 309b6f742fd0..61e3f2c0a0ed 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 */