From: Hugo Landau Date: Mon, 5 Feb 2024 18:45:41 +0000 (+0000) Subject: QUIC RADIX TEST: Quiet warnings about uninitialized variables X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b87c25e5b56daa386ec8d4c41c04d51dd70000f6;p=thirdparty%2Fopenssl.git QUIC RADIX TEST: Quiet warnings about uninitialized variables Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/23487) --- diff --git a/test/radix/quic_bindings.c b/test/radix/quic_bindings.c index d738d8ceaf2..c5b9fe1d11e 100644 --- a/test/radix/quic_bindings.c +++ b/test/radix/quic_bindings.c @@ -657,6 +657,7 @@ static int expect_slot_ssl(FUNC_CTX *fctx, size_t idx, SSL **p_ssl) #define REQUIRE_SSL_N(idx, ssl) \ do { \ + (ssl) = NULL; /* quiet uninitialized warnings */ \ if (!TEST_true(expect_slot_ssl(fctx, (idx), &(ssl)))) \ goto err; \ } while (0) diff --git a/test/radix/terp.c b/test/radix/terp.c index 06aa0aa5159..89d3cbfeaf2 100644 --- a/test/radix/terp.c +++ b/test/radix/terp.c @@ -111,6 +111,7 @@ static ossl_inline int TERP_stk_pop(TERP *terp, #define TERP_STK_POP(terp, v) \ do { \ + memset(&(v), 0, sizeof(v)); /* quiet warnings */ \ if (!TEST_true(TERP_stk_pop((terp), &(v), sizeof(v)))) \ goto err; \ } while (0) @@ -361,6 +362,7 @@ static ossl_inline void SRDR_restore(SRDR *srdr) #define GET_OPERAND(srdr, v) \ do { \ + memset(&(v), 0, sizeof(v)); /* quiet uninitialized warn */ \ if (!TEST_true(SRDR_get_operand(srdr, &(v), sizeof(v)))) \ goto err; \ } while (0) @@ -411,7 +413,7 @@ static int SRDR_print_one(SRDR *srdr, BIO *bio, size_t i, int *was_end) void *v; GET_OPERAND(srdr, v); - PRINT_OPC(PUSH_P); + PRINT_OPC(PUSH_PZ); if (v != NULL && strlen((const char *)v) == 1) BIO_printf(bio, "%20p (%s)", v, (const char *)v); else @@ -441,7 +443,7 @@ static int SRDR_print_one(SRDR *srdr, BIO *bio, size_t i, int *was_end) case OPK_FUNC: { helper_func_t v; - void *f_name, *x; + void *f_name = NULL, *x = NULL; GET_OPERAND(srdr, v); GET_OPERAND(srdr, f_name);