mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
Ignore overflow warning in atomic.h
This commit is contained in:
parent
68bf64ae72
commit
b199bea068
1 changed files with 1 additions and 0 deletions
|
@ -47,6 +47,7 @@ static inline uint8_t __basepriSetMemRetVal(uint8_t prio)
|
|||
#ifdef UNIT_TEST
|
||||
#define ATOMIC_BLOCK(prio) {}
|
||||
#else
|
||||
#pragma GCC diagnostic ignored "-Woverflow"
|
||||
#define ATOMIC_BLOCK(prio) for ( uint8_t __basepri_save __attribute__((__cleanup__(__basepriRestoreMem))) = __get_BASEPRI(), \
|
||||
__ToDo = __basepriSetMemRetVal((prio) << (8U - __NVIC_PRIO_BITS)); __ToDo ; __ToDo = 0 )
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue