Merge pull request #8408 from daverodgman/iar-fix-aes
Fix MBEDTLS_MAYBE_UNUSED for IAR
This commit is contained in:
commit
2db1e354e3
1 changed files with 8 additions and 2 deletions
|
@ -344,8 +344,14 @@ static inline void mbedtls_xor_no_simd(unsigned char *r,
|
||||||
# define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
|
# define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
|
||||||
#endif
|
#endif
|
||||||
#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(__IAR_SYSTEMS_ICC__) && defined(__VER__)
|
#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(__IAR_SYSTEMS_ICC__) && defined(__VER__)
|
||||||
# if (__VER__ >= 8010000) // IAR 8.1 or later
|
/* IAR does support __attribute__((unused)), but only if the -e flag (extended language support)
|
||||||
# define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
|
* 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
|
||||||
#endif
|
#endif
|
||||||
#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(_MSC_VER)
|
#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(_MSC_VER)
|
||||||
|
|
Loading…
Reference in a new issue