diff options
-rw-r--r-- | kern/macros.h | 3 | ||||
-rw-r--r-- | kern/panic.h | 3 | ||||
-rw-r--r-- | kern/printf.h | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/kern/macros.h b/kern/macros.h index a5b7b032..8f0d10ca 100644 --- a/kern/macros.h +++ b/kern/macros.h @@ -73,7 +73,4 @@ #define __packed __attribute__((packed)) #define __alias(x) __attribute__((alias(x))) -#define __format_printf(fmt, args) \ - __attribute__((format(printf, fmt, args))) - #endif /* _KERN_MACROS_H */ diff --git a/kern/panic.h b/kern/panic.h index 9d1d31e0..cd0651a4 100644 --- a/kern/panic.h +++ b/kern/panic.h @@ -23,6 +23,7 @@ /* * Print the given message and halt the system immediately. */ -void __noreturn panic(const char *format, ...) __format_printf(1, 2); +void __noreturn panic(const char *format, ...) + __attribute__((format(printf, 1, 2))); #endif /* _KERN_PANIC_H */ diff --git a/kern/printf.h b/kern/printf.h index 6643d664..0aed7200 100644 --- a/kern/printf.h +++ b/kern/printf.h @@ -33,10 +33,12 @@ #include <stdarg.h> -#include <kern/macros.h> +int printf(const char *format, ...) + __attribute__((format(printf, 1, 2))); + +int vprintf(const char *format, va_list ap) + __attribute__((format(printf, 1, 0))); -int printf(const char *format, ...) __format_printf(1, 2); -int vprintf(const char *format, va_list ap) __format_printf(1, 0); void printf_setup(void); #endif /* _KERN_PRINTF_H */ |