From 86c1d0fddb4fb5e66faca38ac5b256f7cf9ccfec Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 7 May 2021 15:07:21 +0200 Subject: [PATCH] BUILD: fix usage of ha_alert without format string The compilation is failing due to no format string used in ha_alert. This does not need to be backported. --- src/cfgparse-global.c | 2 +- src/cfgparse-listen.c | 2 +- src/haproxy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index 98012d1645..b539a97ca0 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -1310,7 +1310,7 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) continue; if (strcmp(kwl->kw[index].kw, args[0]) == 0) { if (check_kw_experimental(&kwl->kw[index], file, linenum, &errmsg)) { - ha_alert(errmsg); + ha_alert("%s\n", errmsg); err_code |= ERR_ALERT | ERR_FATAL; goto out; } diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index 78f1a5875e..525da58909 100644 --- a/src/cfgparse-listen.c +++ b/src/cfgparse-listen.c @@ -3041,7 +3041,7 @@ stats_error_parsing: continue; if (strcmp(kwl->kw[index].kw, args[0]) == 0) { if (check_kw_experimental(&kwl->kw[index], file, linenum, &errmsg)) { - ha_alert(errmsg); + ha_alert("%s\n", errmsg); err_code |= ERR_ALERT | ERR_FATAL; goto out; } diff --git a/src/haproxy.c b/src/haproxy.c index 0ca87802e1..76fe08cfb9 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -269,7 +269,7 @@ int check_kw_experimental(struct cfg_keyword *kw, const char *file, int linenum, { if (kw->flags & KWF_EXPERIMENTAL) { if (!experimental_directives_allowed) { - memprintf(errmsg, "parsing [%s:%d] : '%s' directive is experimental, must be allowed via a global 'expose-experimental-directives'\n", + memprintf(errmsg, "parsing [%s:%d] : '%s' directive is experimental, must be allowed via a global 'expose-experimental-directives'", file, linenum, kw->kw); return 1; } -- 2.47.2