]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: ssl: use %zd for sizeof() in ssl_ckch.c
authorWilliam Lallemand <wlallemand@haproxy.com>
Sat, 20 Apr 2024 12:25:42 +0000 (14:25 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Sat, 20 Apr 2024 12:25:42 +0000 (14:25 +0200)
commit7556e5b3a4299efa97ba360d2e77829f4db18e90
treebeab368a0eec01fadef9204587895b15379f6f30
parentad6760b9bdde2a2c14d1070797e69e87c79de3c0
BUILD: ssl: use %zd for sizeof() in ssl_ckch.c

32bits build was broken because of wrong printf length modifier.

src/ssl_ckch.c:4144:66: error: format specifies type 'long' but the argument has type 'unsigned int' [-Werror,-Wformat]
 4143 |                                                 memprintf(err, "parsing [%s:%d] : cannot parse '%s' value '%s', too long, max len is %ld.\n",
      |                                                                                                                                      ~~~
      |                                                                                                                                      %u
 4144 |                                                           file, linenum, args[cur_arg], args[cur_arg + 1], sizeof(alias_name));
      |                                                                                                            ^~~~~~~~~~~~~~~~~~
src/ssl_ckch.c:4217:64: error: format specifies type 'long' but the argument has type 'unsigned int' [-Werror,-Wformat]
 4216 |                                 memprintf(err, "parsing [%s:%d] : cannot parse '%s' value '%s', too long, max len is %ld.\n",
      |                                                                                                                      ~~~
      |                                                                                                                      %u
 4217 |                                           file, linenum, args[cur_arg], args[cur_arg + 1], sizeof(alias_name));
      |                                                                                            ^~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [Makefile:1034: src/ssl_ckch.o] Error 1
make: *** Waiting for unfinished jobs....

Replace %ld by %zd.

Should fix issue #2542.
src/ssl_ckch.c