@@ -985,6 +985,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
985
985
UBaseType_t uxCurrentPriority = uxTopReadyPriority ;
986
986
BaseType_t xTaskScheduled = pdFALSE ;
987
987
BaseType_t xDecrementTopPriority = pdTRUE ;
988
+ TCB_t * pxTCB = NULL ;
988
989
989
990
#if ( configUSE_CORE_AFFINITY == 1 )
990
991
const TCB_t * pxPreviousTCB = NULL ;
@@ -1043,7 +1044,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
1043
1044
/* MISRA Ref 11.5.3 [Void pointer assignment] */
1044
1045
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
1045
1046
/* coverity[misra_c_2012_rule_11_5_violation] */
1046
- TCB_t * pxTCB = ( TCB_t * ) listGET_LIST_ITEM_OWNER ( pxIterator );
1047
+ pxTCB = ( TCB_t * ) listGET_LIST_ITEM_OWNER ( pxIterator );
1047
1048
1048
1049
#if ( configRUN_MULTIPLE_PRIORITIES == 0 )
1049
1050
{
@@ -4181,6 +4182,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery )
4181
4182
const char pcNameToQuery [] )
4182
4183
{
4183
4184
TCB_t * pxReturn = NULL ;
4185
+ TCB_t * pxTCB = NULL ;
4184
4186
UBaseType_t x ;
4185
4187
char cNextChar ;
4186
4188
BaseType_t xBreakLoop ;
@@ -4196,7 +4198,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery )
4196
4198
/* MISRA Ref 11.5.3 [Void pointer assignment] */
4197
4199
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
4198
4200
/* coverity[misra_c_2012_rule_11_5_violation] */
4199
- TCB_t * pxTCB = listGET_LIST_ITEM_OWNER ( pxIterator );
4201
+ pxTCB = listGET_LIST_ITEM_OWNER ( pxIterator );
4200
4202
4201
4203
/* Check each character in the name looking for a match or
4202
4204
* mismatch. */
@@ -6255,10 +6257,10 @@ static void prvCheckTasksWaitingTermination( void )
6255
6257
List_t * pxList ,
6256
6258
eTaskState eState )
6257
6259
{
6258
- configLIST_VOLATILE TCB_t * pxTCB ;
6259
6260
UBaseType_t uxTask = 0 ;
6260
6261
const ListItem_t * pxEndMarker = listGET_END_MARKER ( pxList );
6261
6262
ListItem_t * pxIterator ;
6263
+ TCB_t * pxTCB = NULL ;
6262
6264
6263
6265
if ( listCURRENT_LIST_LENGTH ( pxList ) > ( UBaseType_t ) 0 )
6264
6266
{
0 commit comments