freertos: fix build warnings with -Wsign-conversion CFLAG

Closes https://github.com/espressif/esp-idf/issues/4946
This commit is contained in:
Harshit Malpani
2021-11-15 11:10:16 +05:30
parent 39f3e082e1
commit 2c84db95d2
6 changed files with 11 additions and 11 deletions

View File

@@ -314,7 +314,7 @@ void vPortSetStackWatchpoint(void *pxStackStart);
*/
static inline BaseType_t IRAM_ATTR xPortGetCoreID(void)
{
return (uint32_t) cpu_hal_get_core_id();
return (BaseType_t) cpu_hal_get_core_id();
}

View File

@@ -18,7 +18,7 @@
* @deprecated This function is deprecated. Call portSET_INTERRUPT_MASK_FROM_ISR() instead
*/
static inline __attribute__((deprecated)) UBaseType_t portENTER_CRITICAL_NESTED(void) {
return portSET_INTERRUPT_MASK_FROM_ISR();
return (UBaseType_t) portSET_INTERRUPT_MASK_FROM_ISR();
}
/**
@@ -30,7 +30,7 @@ static inline __attribute__((deprecated)) UBaseType_t portENTER_CRITICAL_NESTED(
*/
static inline void __attribute__((deprecated)) portEXIT_CRITICAL_NESTED(UBaseType_t prev_level)
{
portCLEAR_INTERRUPT_MASK_FROM_ISR(prev_level);
portCLEAR_INTERRUPT_MASK_FROM_ISR((int) prev_level);
}
/* ---------------------- Spinlocks --------------------- */

View File

@@ -568,7 +568,7 @@ static inline UBaseType_t xPortSetInterruptMaskFromISR(void)
static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level)
{
portbenchmarkINTERRUPT_RESTORE(prev_level);
XTOS_RESTORE_JUST_INTLEVEL(prev_level);
XTOS_RESTORE_JUST_INTLEVEL((int) prev_level);
}
// ------------------ Critical Sections --------------------
@@ -631,7 +631,7 @@ static inline bool IRAM_ATTR xPortCanYield(void)
static inline BaseType_t IRAM_ATTR xPortGetCoreID(void)
{
return (uint32_t) cpu_hal_get_core_id();
return (BaseType_t) cpu_hal_get_core_id();
}
static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set)