From: Christopher Faulet Date: Fri, 3 Jun 2022 14:37:31 +0000 (+0200) Subject: BUILD: ssl_ckch: Fix build error about a possible uninitialized value X-Git-Tag: v2.7-dev1~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea2c8c6ba77e363cc525ccb309ec9f3ba8b13197;p=thirdparty%2Fhaproxy.git BUILD: ssl_ckch: Fix build error about a possible uninitialized value A build error is reported about the path variable in the switch statement on the commit type, in cli_io_handler_commit_cafile_crlfile() function. The enum contains only 2 values, but a default clause has been added to return an error to make GCC happy. This patch must be backported as far as 2.5. --- diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index ab8ceaadd5..e882c1a750 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -2709,6 +2709,8 @@ static int cli_io_handler_commit_cafile_crlfile(struct appctx *appctx) case CAFILE_CRL: path = crlfile_transaction.path; break; + default: + goto error; } while (1) {