diff options
Diffstat (limited to 'kern')
-rw-r--r-- | kern/printf.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/kern/printf.h b/kern/printf.h index 0f8b328..86857d3 100644 --- a/kern/printf.h +++ b/kern/printf.h @@ -39,11 +39,16 @@ extern void printnum (unsigned long u, int base, void (*putc)(char, vm_offset_t), vm_offset_t putc_arg); -extern int sprintf (char *buf, const char *fmt, ...); -extern int snprintf (char *buf, size_t size, const char *fmt, ...); -extern int vsnprintf (char *buf, size_t size, const char *fmt, va_list args); +extern int sprintf (char *buf, const char *fmt, ...) + __attribute__ ((format (printf, 2, 3))); +extern int snprintf (char *buf, size_t size, const char *fmt, ...) + __attribute__ ((format (printf, 3, 4))); +extern int vsnprintf (char *buf, size_t size, const char *fmt, va_list args) + __attribute__ ((format (printf, 3, 0))); -extern int printf (const char *fmt, ...); + +extern int printf (const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); #define printf_once(fmt, ...) \ MACRO_BEGIN \ |