Merge pull request #7544 from josepho0918/iar

Expand supported attributes for IAR
pull/7562/head
David Garske 2024-05-20 09:34:55 -07:00 committed by GitHub
commit 0987bf4c1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -303,7 +303,8 @@ typedef struct w64wrapper {
#ifndef WARN_UNUSED_RESULT #ifndef WARN_UNUSED_RESULT
#if defined(WOLFSSL_LINUXKM) && defined(__must_check) #if defined(WOLFSSL_LINUXKM) && defined(__must_check)
#define WARN_UNUSED_RESULT __must_check #define WARN_UNUSED_RESULT __must_check
#elif defined(__GNUC__) && (__GNUC__ >= 4) #elif (defined(__GNUC__) && (__GNUC__ >= 4)) || \
(defined(__IAR_SYSTEMS_ICC__) && (__VER__ >= 9040001))
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else #else
#define WARN_UNUSED_RESULT #define WARN_UNUSED_RESULT
@ -311,7 +312,7 @@ typedef struct w64wrapper {
#endif /* WARN_UNUSED_RESULT */ #endif /* WARN_UNUSED_RESULT */
#ifndef WC_MAYBE_UNUSED #ifndef WC_MAYBE_UNUSED
#if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) #if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) || defined(__IAR_SYSTEMS_ICC__)
#define WC_MAYBE_UNUSED __attribute__((unused)) #define WC_MAYBE_UNUSED __attribute__((unused))
#else #else
#define WC_MAYBE_UNUSED #define WC_MAYBE_UNUSED