diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index a1b1ca8c7..2342f6034 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -229,7 +229,6 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack, /* Ensure that there is enough space to store Thread_t on the stack. */ ulStackSize = ( size_t ) ( pxTopOfStack + 1 - pxEndOfStack ) * sizeof( *pxTopOfStack ); configASSERT( ulStackSize > sizeof( Thread_t ) ); - ( void ) ulStackSize; /* suppress set but not used warning */ thread->pxCode = pxCode; thread->pvParams = pvParameters; diff --git a/portable/ThirdParty/GCC/RP2040/include/portmacro.h b/portable/ThirdParty/GCC/RP2040/include/portmacro.h index 3e54f384f..802470e33 100644 --- a/portable/ThirdParty/GCC/RP2040/include/portmacro.h +++ b/portable/ThirdParty/GCC/RP2040/include/portmacro.h @@ -227,7 +227,7 @@ static inline void vPortRecursiveLock( BaseType_t xCoreID, if( ucOwnedByCore[ xCoreID ][ ulLockNum ] ) { configASSERT( ucRecursionCountByLock[ ulLockNum ] != 255u ); - ucRecursionCountByLock[ ulLockNum ] = ucRecursionCountByLock[ ulLockNum ] + 1; + ucRecursionCountByLock[ ulLockNum ]++; return; } spin_lock_unsafe_blocking(pxSpinLock); @@ -241,8 +241,7 @@ static inline void vPortRecursiveLock( BaseType_t xCoreID, configASSERT( ( ucOwnedByCore[ xCoreID ] [ulLockNum ] ) != 0 ); configASSERT( ucRecursionCountByLock[ ulLockNum ] != 0 ); - ucRecursionCountByLock[ ulLockNum ] = ucRecursionCountByLock[ ulLockNum ] - 1; - if ( ucRecursionCountByLock[ ulLockNum ] == 0U ) + if( !--ucRecursionCountByLock[ ulLockNum ] ) { ucOwnedByCore[ xCoreID ] [ ulLockNum ] = 0; spin_unlock_unsafe(pxSpinLock);