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.
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index df21cbd..a57761e 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -7328,6 +7328,11 @@
}
#endif
+#if !defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) && \
+ !defined(MBEDTLS_SSL_PROTO_DTLS)
+ ((void) ssl);
+#endif
+
return( (int) max_len );
}