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.
This commit is contained in:
Gilles Peskine 2020-03-09 20:43:51 +01:00
parent eccd888717
commit 19e841e19f

View file

@ -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_test_message_queue* queue;
mbedtls_mock_socket* socket; mbedtls_mock_socket* socket;
mbedtls_test_message_socket_context *context = (mbedtls_test_message_socket_context*) ctx; 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; size_t msg_len;
int ret; int ret;