Skip to content

Commit 39bdbd7

Browse files
igrrespressif-bot
authored andcommitted
freertos: fix compilation warning at -O2 level
Closes espressif/esp-idf#5525
1 parent 6e9b480 commit 39bdbd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/freertos/tasks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,11 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB, TaskFunction_t pxTaskCode
645645
*/
646646
void taskYIELD_OTHER_CORE( BaseType_t xCoreID, UBaseType_t uxPriority )
647647
{
648-
TCB_t *curTCB = pxCurrentTCB[xCoreID];
648+
TCB_t *curTCB;
649649
BaseType_t i;
650650

651651
if (xCoreID != tskNO_AFFINITY) {
652+
curTCB = pxCurrentTCB[xCoreID];
652653
if ( curTCB->uxPriority < uxPriority ) { // NOLINT(clang-analyzer-core.NullDereference) IDF-685
653654
vPortYieldOtherCore( xCoreID );
654655
}

0 commit comments

Comments
 (0)