]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: fix usage of ha_alert without format string
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 7 May 2021 13:07:21 +0000 (15:07 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 7 May 2021 13:07:21 +0000 (15:07 +0200)
The compilation is failing due to no format string used in ha_alert.
This does not need to be backported.

src/cfgparse-global.c
src/cfgparse-listen.c
src/haproxy.c

index 98012d1645c7545404fbcd0e5ad76f4319a843e8..b539a97ca005ca5c60cf054fa0ff59bcdefbd631 100644 (file)
@@ -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;
                                        }
index 78f1a5875ea06fa315afc283d0915a1cc35a81fa..525da589096ac2047a009ffe14056b361f580423 100644 (file)
@@ -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;
                                        }
index 0ca87802e1501f1d0a28c4a1f6176d8bcb71918f..76fe08cfb9dd54170ee535617e074a7a3899cd34 100644 (file)
@@ -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;
                }