diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-08 15:03:09 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-08 15:03:09 +0200 |
commit | d3e8b6c6b8a366d7cd98fe3b999e450105f9290a (patch) | |
tree | 8f3396cb39dad90fee02ee647418d801489f26f1 /thirdparty/mbedtls/library/common.h | |
parent | 0e50807c55d4cb24a796e7ec2901cb78698e288b (diff) | |
parent | 915ca4dd456f959e4d4fd4e385715f3f0d48e77d (diff) | |
download | redot-engine-d3e8b6c6b8a366d7cd98fe3b999e450105f9290a.tar.gz |
Merge pull request #90209 from akien-mga/mbedtls-2.28.8
mbedtls: Update to upstream version 2.28.8
Diffstat (limited to 'thirdparty/mbedtls/library/common.h')
-rw-r--r-- | thirdparty/mbedtls/library/common.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/thirdparty/mbedtls/library/common.h b/thirdparty/mbedtls/library/common.h index bf18d725cc..49e2c97ea0 100644 --- a/thirdparty/mbedtls/library/common.h +++ b/thirdparty/mbedtls/library/common.h @@ -350,4 +350,31 @@ static inline const unsigned char *mbedtls_buffer_offset_const( #define MBEDTLS_STATIC_ASSERT(expr, msg) #endif +/* Suppress compiler warnings for unused functions and variables. */ +#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(__has_attribute) +# if __has_attribute(unused) +# define MBEDTLS_MAYBE_UNUSED __attribute__((unused)) +# endif +#endif +#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(__GNUC__) +# define MBEDTLS_MAYBE_UNUSED __attribute__((unused)) +#endif +#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(__IAR_SYSTEMS_ICC__) && defined(__VER__) +/* IAR does support __attribute__((unused)), but only if the -e flag (extended language support) + * is given; the pragma always works. + * Unfortunately the pragma affects the rest of the file where it is used, but this is harmless. + * Check for version 5.2 or later - this pragma may be supported by earlier versions, but I wasn't + * able to find documentation). + */ +# if (__VER__ >= 5020000) +# define MBEDTLS_MAYBE_UNUSED _Pragma("diag_suppress=Pe177") +# endif +#endif +#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(_MSC_VER) +# define MBEDTLS_MAYBE_UNUSED __pragma(warning(suppress:4189)) +#endif +#if !defined(MBEDTLS_MAYBE_UNUSED) +# define MBEDTLS_MAYBE_UNUSED +#endif + #endif /* MBEDTLS_LIBRARY_COMMON_H */ |