]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: ssl_ckch: fix "maybe-uninitialized" build error on gcc-9.4 + ARM
authorWilly Tarreau <w@1wt.eu>
Wed, 22 Jun 2022 03:40:25 +0000 (05:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 Jun 2022 03:45:34 +0000 (05:45 +0200)
commitd543ae0e684d1d045570096549e1f6461292e32f
tree93851943a036c9db99e97a8394ffd6fe1ecf8705
parent798d6fc0a7d0e55817c4fd56a741c1a4a24ef082
BUILD: ssl_ckch: fix "maybe-uninitialized" build error on gcc-9.4 + ARM

As reported in issue #1755, gcc-9.3 and 9.4 emit a "maybe-uninitialized"
warning in cli_io_handler_commit_cafile_crlfile() because it sees that
when the "path" variable is not set, we're jumping to the error label
inside the loop but cannot see that the new state will avoid the places
where the value is used. Thus it's a false positive but a difficult one.
Let's just preset the value to NULL to make it happy.

This was introduced in 2.7-dev by commit ddc8e1cf8 ("MINOR: ssl_ckch:
Simplify I/O handler to commit changes on CA/CRL entry"), thus no
backport is needed for now.
src/ssl_ckch.c