Introduce MBEDTLS_MAYBE_UNUSED

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2023-10-04 13:50:54 +01:00
parent a7127eb67c
commit 1ec1a0f0cc

View file

@ -334,4 +334,11 @@ static inline void mbedtls_xor_no_simd(unsigned char *r,
#define MBEDTLS_OPTIMIZE_FOR_PERFORMANCE
#endif
/* Suppress compiler warnings for unused functions and variables. */
#if defined(__GNUC__)
#define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
#else
#define MBEDTLS_MAYBE_UNUSED
#endif
#endif /* MBEDTLS_LIBRARY_COMMON_H */