mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Support MBEDTLS_MAYBE_UNUSED in MSVC and IAR
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@ -337,6 +337,12 @@ static inline void mbedtls_xor_no_simd(unsigned char *r,
|
|||||||
/* Suppress compiler warnings for unused functions and variables. */
|
/* Suppress compiler warnings for unused functions and variables. */
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
|
#define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
|
||||||
|
#elif defined(__IAR_SYSTEMS_ICC__) && defined(__VER__)
|
||||||
|
#if (__VER__ >= 8000000)
|
||||||
|
#define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
|
||||||
|
#endif
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define MBEDTLS_MAYBE_UNUSED __pragma(warning(suppress:4189))
|
||||||
#else
|
#else
|
||||||
#define MBEDTLS_MAYBE_UNUSED
|
#define MBEDTLS_MAYBE_UNUSED
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user