From a50cd0ffd8830d13f179631d5ef9c45fc950cb45 Mon Sep 17 00:00:00 2001 From: Adrian Scillato Date: Tue, 5 Mar 2024 10:37:04 -0800 Subject: [PATCH] Fix compilation when -Werror=maybe-uninitialized is enabled The `now` struct is not initialized and the compiler complains about it. Signed-off-by: Adrian Scillato --- library/x509_crt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/x509_crt.c b/library/x509_crt.c index 7f0160a00f..32862fe4b1 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -2523,7 +2523,7 @@ static int x509_crt_verify_chain( int signature_is_good; unsigned self_cnt; mbedtls_x509_crt *cur_trust_ca = NULL; - mbedtls_x509_time now; + mbedtls_x509_time now = {0}; #if defined(MBEDTLS_HAVE_TIME_DATE) if (mbedtls_x509_time_gmtime(mbedtls_time(NULL), &now) != 0) {