From 284e9f8d3bc0c66da2a86eece6aefd68f6e72420 Mon Sep 17 00:00:00 2001 From: Neil Thiessen Date: Wed, 31 Aug 2016 12:10:01 -0600 Subject: [PATCH 1/2] [HAL] Fixed "intrinsic is deprecated" warnings Suppressed "#3731-D: intrinsic is deprecated" compiler warnings in critical API. --- hal/common/mbed_critical.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hal/common/mbed_critical.c b/hal/common/mbed_critical.c index 0afe0d5ad73..af74f6837c0 100644 --- a/hal/common/mbed_critical.c +++ b/hal/common/mbed_critical.c @@ -86,6 +86,9 @@ void core_util_critical_section_exit(void) #if EXCLUSIVE_ACCESS +/* Supress __ldrex and __strex deprecated warnings - "#3731-D: intrinsic is deprecated" */ +#pragma diag_suppress 3731 + bool core_util_atomic_cas_u8(uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_t desiredValue) { uint8_t currentValue = __LDREXB((volatile uint8_t*)ptr); From 9eafc810f339455b7982972aea7cd1f703b25038 Mon Sep 17 00:00:00 2001 From: Neil Thiessen Date: Wed, 31 Aug 2016 13:30:45 -0600 Subject: [PATCH 2/2] Fixed compiler warning suppression "#3731-D: intrinsic is deprecated" compiler warnings should only be suppressed on the ARM toolchain. --- hal/common/mbed_critical.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hal/common/mbed_critical.c b/hal/common/mbed_critical.c index af74f6837c0..f65f67a8b5d 100644 --- a/hal/common/mbed_critical.c +++ b/hal/common/mbed_critical.c @@ -87,7 +87,9 @@ void core_util_critical_section_exit(void) #if EXCLUSIVE_ACCESS /* Supress __ldrex and __strex deprecated warnings - "#3731-D: intrinsic is deprecated" */ +#if defined (__CC_ARM) #pragma diag_suppress 3731 +#endif bool core_util_atomic_cas_u8(uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_t desiredValue) {