mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-01-17 15:20:25 -05:00
Add cast in stack allocation for task creation (#1340)
for negative portSTACK_GROWTH, add cast to stack allocation, just like it is in positive portSTACK_GROWTH
This commit is contained in:
parent
14b30f209f
commit
26f9a2fdd3
1 changed files with 1 additions and 1 deletions
2
tasks.c
2
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 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue