aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-11-06 13:22:26 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-11-13 10:04:30 +0000
commit2f0ab1da89de0a9db47b41863ddd822216707726 (patch)
treeb34a25195c98a2d971d55c3a7b5f096f5136fd37
parentconfig: drop all warning logs from the tweak section (diff)
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)
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
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}));