summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-02-05 18:45:41 +0000
committerHugo Landau <hlandau@openssl.org>2024-04-19 09:31:06 +0100
commit0c86f6ff35276bb084e3ca622146fc2098386744 (patch)
treea94841911743a8d26570a4cc9665b0360f4512d8
parent66e0fb8dc1dce0f9dcfd930cb96cba9dac1b51ad (diff)
QUIC RADIX TEST: Quiet warnings about uninitialized variables
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23487)
-rw-r--r--test/radix/quic_bindings.c1
-rw-r--r--test/radix/terp.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/test/radix/quic_bindings.c b/test/radix/quic_bindings.c
index d738d8ceaf..c5b9fe1d11 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 06aa0aa515..89d3cbfeaf 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);