Skip to content

Commit

Permalink
QUIC RADIX TEST: Quiet warnings about uninitialized variables
Browse files Browse the repository at this point in the history
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #23487)
  • Loading branch information
hlandau committed Mar 26, 2024
1 parent d37e18e commit 3d2da8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/radix/quic_bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions test/radix/terp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3d2da8f

Please sign in to comment.