From: Willy Tarreau Date: Wed, 22 Jun 2022 03:40:25 +0000 (+0200) Subject: BUILD: ssl_ckch: fix "maybe-uninitialized" build error on gcc-9.4 + ARM X-Git-Tag: v2.7-dev1~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d543ae0e684d1d045570096549e1f6461292e32f;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index 9d7775ae01..da982405a8 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -2710,6 +2710,7 @@ static int cli_io_handler_commit_cafile_crlfile(struct appctx *appctx) path = crlfile_transaction.path; break; default: + path = NULL; goto error; }