about summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/error.c6
-rw-r--r--misc/sys/syslog.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/misc/error.c b/misc/error.c
index 599de78629..8758bd0ade 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -74,10 +74,12 @@ unsigned int error_message_count;
 
 /* In GNU libc we want do not want to use the common name `error' directly.
    Instead make it a weak alias.  */
-extern void __error (int status, int errnum, const char *message, ...);
+extern void __error (int status, int errnum, const char *message, ...)
+     __attribute__ ((__format__ (__printf__, 3, 4)));
 extern void __error_at_line (int status, int errnum, const char *file_name,
 			     unsigned int line_number, const char *message,
-			     ...);
+			     ...)
+     __attribute__ ((__format__ (__printf__, 5, 6)));;
 # define error __error
 # define error_at_line __error_at_line
 
diff --git a/misc/sys/syslog.h b/misc/sys/syslog.h
index a2b720909a..940ee2dec3 100644
--- a/misc/sys/syslog.h
+++ b/misc/sys/syslog.h
@@ -179,12 +179,13 @@ extern void openlog (__const char *__ident, int __option, int __facility)
 extern int setlogmask (int __mask) __THROW;
 
 /* Generate a log message using FMT string and option arguments.  */
-extern void syslog (int __pri, __const char *__fmt, ...) __THROW;
+extern void syslog (int __pri, __const char *__fmt, ...) __THROW
+     __attribute__ ((__format__(__printf__, 2, 3)));
 
 #ifdef __USE_BSD
 /* Generate a log message using FMT and using arguments pointed to by AP.  */
 extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap)
-     __THROW;
+     __THROW __attribute__ ((__format__(__printf__, 2, 0)));
 #endif
 
 __END_DECLS