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)
This commit is contained in:
Daniel Eklöf 2021-11-06 14:22:26 +01:00
parent d4b9ef7607
commit 2f0ab1da89
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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}));