From 60785d113b769ee32752792798ea790ac8a0a0c1 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 7 Jun 2019 17:49:11 +0100 Subject: [PATCH] Remove unused variable warning in on-demand X.509 parsing --- include/mbedtls/x509_crt.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h index 3ef2b48dc6..ff1422b0ab 100644 --- a/include/mbedtls/x509_crt.h +++ b/include/mbedtls/x509_crt.h @@ -866,8 +866,14 @@ static inline int mbedtls_x509_crt_frame_release( mbedtls_x509_crt const *crt ) #endif /* MBEDTLS_THREADING_C */ #if defined(MBEDTLS_X509_ALWAYS_FLUSH) - (void) mbedtls_x509_crt_flush_cache_frame( crt ); + (void) mbedtls_x509_crt_flush_cache_frame( crt ); #endif /* MBEDTLS_X509_ALWAYS_FLUSH */ + +#if !defined(MBEDTLS_X509_ALWAYS_FLUSH) && \ + !defined(MBEDTLS_THREADING_C) + ((void) crt); +#endif + return( 0 ); } @@ -948,9 +954,14 @@ static inline int mbedtls_x509_crt_pk_release( mbedtls_x509_crt const *crt ) #endif /* MBEDTLS_THREADING_C */ #if defined(MBEDTLS_X509_ALWAYS_FLUSH) - (void) mbedtls_x509_crt_flush_cache_pk( crt ); + (void) mbedtls_x509_crt_flush_cache_pk( crt ); #endif /* MBEDTLS_X509_ALWAYS_FLUSH */ +#if !defined(MBEDTLS_X509_ALWAYS_FLUSH) && \ + !defined(MBEDTLS_THREADING_C) + ((void) crt); +#endif + return( 0 ); }