1
0
Fork 0
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:
Pawel Spychalski (DzikuVx) 2024-04-02 11:41:04 +02:00
parent 68bf64ae72
commit b199bea068

View file

@ -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 )