From 890dceeebf78072ef6fe591d0d66c5a48d6e4d50 Mon Sep 17 00:00:00 2001 From: Cory Snider Date: Thu, 15 Sep 2022 15:40:10 -0400 Subject: [PATCH] libct/nsenter: annotate write_log() prototype ...so the compiler can warn about mismatches between the format string and varargs. Signed-off-by: Cory Snider --- libcontainer/nsenter/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/nsenter/log.h b/libcontainer/nsenter/log.h index 124d9da7e..1fe95a111 100644 --- a/libcontainer/nsenter/log.h +++ b/libcontainer/nsenter/log.h @@ -20,7 +20,7 @@ */ void setup_logpipe(void); -void write_log(int level, const char *format, ...); +void write_log(int level, const char *format, ...) __attribute__((format(printf, 2, 3))); extern int logfd; #define bail(fmt, ...) \