From 19e841e19ffdd40673257ae746a337c63b4b3da5 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 9 Mar 2020 20:43:51 +0100 Subject: [PATCH] Fix warning about a potentially initialized variable The variable drop_len is only used under conditions where it has been initialized, but this is somewhat fragile and not obvious for a compiler to see. --- tests/suites/test_suite_ssl.function | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index d32d9ddc68..7aa20327a6 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -645,7 +645,7 @@ int mbedtls_mock_tcp_recv_msg( void *ctx, unsigned char *buf, size_t buf_len ) mbedtls_test_message_queue* queue; mbedtls_mock_socket* socket; mbedtls_test_message_socket_context *context = (mbedtls_test_message_socket_context*) ctx; - size_t drop_len; + size_t drop_len = 0; size_t msg_len; int ret;