From ea2c8c6ba77e363cc525ccb309ec9f3ba8b13197 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 3 Jun 2022 16:37:31 +0200 Subject: [PATCH] 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. --- src/ssl_ckch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index ab8ceaadd..e882c1a75 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) {