mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
freertos: fix build warnings with -Wsign-conversion CFLAG
Closes https://github.com/espressif/esp-idf/issues/4946
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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 --------------------- */
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user