Skip to content

Commit e430418

Browse files
committed
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
1 parent 7d6890e commit e430418

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
16891689
/* MISRA Ref 11.5.1 [Malloc memory assignment] */
16901690
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
16911691
/* coverity[misra_c_2012_rule_11_5_violation] */
1692-
pxStack = pvPortMallocStack( ( ( ( size_t ) uxStackDepth ) * sizeof( StackType_t ) ) );
1692+
pxStack = ( StackType_t * ) pvPortMallocStack( ( ( ( size_t ) uxStackDepth ) * sizeof( StackType_t ) ) );
16931693

16941694
if( pxStack != NULL )
16951695
{

0 commit comments

Comments
 (0)