From 2f0ab1da89de0a9db47b41863ddd822216707726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 6 Nov 2021 14:22:26 +0100 Subject: [PATCH] config: appease compiler ../../foot/config.c:154:50: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] log_msg(log_class, LOG_MODULE, file, lineno, formatted_msg); ^~~~~~~~~~~~~ ../../foot/config.c:154:50: note: treat the string as an argument to avoid this log_msg(log_class, LOG_MODULE, file, lineno, formatted_msg) --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.c b/config.c index 1c8165f8..9f77ef22 100644 --- a/config.c +++ b/config.c @@ -151,7 +151,7 @@ log_and_notify_va(struct config *conf, enum log_class log_class, } char *formatted_msg = xvasprintf(fmt, va); - log_msg(log_class, LOG_MODULE, file, lineno, formatted_msg); + log_msg(log_class, LOG_MODULE, file, lineno, "%s", formatted_msg); tll_push_back( conf->notifications, ((struct user_notification){.kind = kind, .text = formatted_msg}));