From 0defedb48823b931f04e8b626356f80b5b2de7c5 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 10 Aug 2018 12:35:02 +0100 Subject: [PATCH] Fix unused variable warning in mbedtls_ssl_get_max_record_payload If neither the maximum fragment length extension nor DTLS are used, the SSL context argument is unnecessary as the maximum payload length is hardcoded as MBEDTLS_SSL_MAX_CONTENT_LEN. --- library/ssl_tls.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index df21cbd2b..a57761ecb 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -7328,6 +7328,11 @@ int mbedtls_ssl_get_max_out_record_payload( const mbedtls_ssl_context *ssl ) } #endif +#if !defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) && \ + !defined(MBEDTLS_SSL_PROTO_DTLS) + ((void) ssl); +#endif + return( (int) max_len ); }