From 53957b1cc12cac4841d1f79d1014d858eeca7ae2 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sat, 8 Jun 2019 17:41:34 +0200 Subject: kern/log: add printf-specific warnings to log_printf_fn_t --- kern/log.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kern/log.h b/kern/log.h index af5e009f..f041005d 100644 --- a/kern/log.h +++ b/kern/log.h @@ -44,7 +44,8 @@ enum { * One call to a log print function produces a single log line, with a * newline character. */ -typedef int (*log_print_fn_t)(const char *format, ...); +typedef int (*log_print_fn_t)(const char *format, ...) + __attribute__((format(printf, 1, 2))); /* * Generate a message and send it to the log thread. -- cgit v1.2.3