Mark SSL ctx unused in ssl_prepare_reassembly_buffer() if !DEBUG

The SSL context is passed to the reassembly preparation function
ssl_prepare_reassembly_buffer() solely for the purpose of allowing
debugging output. This commit marks the context as unused if
debugging is disabled (through !MBEDTLS_DEBUG_C).
This commit is contained in:
Hanno Becker 2018-08-17 09:06:31 +01:00
parent 872730481d
commit 56d5eaa96c

View file

@ -3531,6 +3531,11 @@ static int ssl_prepare_reassembly_buffer( mbedtls_ssl_context *ssl, /* debug */
size_t alloc_len;
unsigned char *buf;
#if !defined(MBEDTLS_DEBUG_C)
/* The SSL context is used for debugging only. */
((void) ssl);
#endif
MBEDTLS_SSL_DEBUG_MSG( 2, ( "initialize reassembly, total length = %d",
msg_len ) );