Commit 026968f6 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

compel std_printf: annotate with printf

This function works like printf, and it helps the compiler
to know that, so it can check whether arguments fit the
format string.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 6b5b2996
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
extern void __std_putc(int fd, char c); extern void __std_putc(int fd, char c);
extern void __std_puts(int fd, const char *s); extern void __std_puts(int fd, const char *s);
extern void __std_printk(int fd, const char *format, va_list args); extern void __std_printk(int fd, const char *format, va_list args);
extern void __std_printf(int fd, const char *format, ...); extern void __std_printf(int fd, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
#define std_printf(fmt, ...) __std_printf(STDOUT_FILENO, fmt, ##__VA_ARGS__) #define std_printf(fmt, ...) __std_printf(STDOUT_FILENO, fmt, ##__VA_ARGS__)
#define std_puts(s) __std_puts(STDOUT_FILENO, s) #define std_puts(s) __std_puts(STDOUT_FILENO, s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment