From 82187b50b63ad0748d7533d083df64d247b74b6f Mon Sep 17 00:00:00 2001 From: Sidharth Date: Sun, 14 Dec 2025 17:30:02 +0530 Subject: [PATCH] Add cast in stack allocation for task creation for negative portSTACK_GROWTH, add cast to stack allocation, just like it is in positive portSTACK_GROWTH --- tasks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks.c b/tasks.c index 1e6ecdc9ed..92f98c74c5 100644 --- a/tasks.c +++ b/tasks.c @@ -1689,7 +1689,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION; /* MISRA Ref 11.5.1 [Malloc memory assignment] */ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */ /* coverity[misra_c_2012_rule_11_5_violation] */ - pxStack = pvPortMallocStack( ( ( ( size_t ) uxStackDepth ) * sizeof( StackType_t ) ) ); + pxStack = ( StackType_t * ) pvPortMallocStack( ( ( ( size_t ) uxStackDepth ) * sizeof( StackType_t ) ) ); if( pxStack != NULL ) {