From 6d58c9ed0b4d0ed4b7c364a6d636cc53543db596 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 14 Apr 2022 00:17:15 +0200 Subject: [PATCH] Enable printf format attributes to logit() and flog() We don't want repeats of issue #236, so let's start by tracking down any bugs hidden in logging functions. Signed-off-by: Joachim Wiberg --- src/log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/log.h b/src/log.h index e3ba3040..14bc2edf 100644 --- a/src/log.h +++ b/src/log.h @@ -50,7 +50,7 @@ void log_exit (void); void log_debug (void); -void logit (int prio, const char *fmt, ...); -void flog (char *file, const char *fmt, ...); +void logit (int prio, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); +void flog (char *file, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); #endif /* FINIT_LOG_H_ */