mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
Merge branch 'fix/wshadow_warning_on__atomic_test_and_set' into 'release/v5.3'
fix(newlib): fix intended warning in case -Wshadow is enabled See merge request espressif/esp-idf!44632
This commit is contained in:
@@ -12,11 +12,16 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wshadow"
|
||||||
|
|
||||||
static inline bool __atomic_test_and_set(volatile void *ptr, int memorder)
|
static inline bool __atomic_test_and_set(volatile void *ptr, int memorder)
|
||||||
{
|
{
|
||||||
return __atomic_exchange_1((bool *)ptr, true, memorder);
|
return __atomic_exchange_1((bool *)ptr, true, memorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user