Skip to content

Commit

Permalink
Fix compiler warning in config assert() on 64 bit architecture (#158)
Browse files Browse the repository at this point in the history
* Replace the following code that was used to force an assert:
configASSERT( pxTCB->ulNotifiedValue[ uxIndexToNotify ] == ~0UL );

with:
configASSERT( xTickCount == ( TickType_t ) 0 );

Because the former generates a warning on 64-bit architectures.
  • Loading branch information
RichardBarry authored Sep 7, 2020
1 parent 82fdc1c commit 700c1cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -4887,7 +4887,7 @@ TickType_t uxTaskResetEventItemValue( void )
/* Should not get here if all enums are handled.
* Artificially force an assert by testing a value the
* compiler can't assume is const. */
configASSERT( pxTCB->ulNotifiedValue[ uxIndexToNotify ] == ~0UL );
configASSERT( xTickCount == ( TickType_t ) 0 );

break;
}
Expand Down Expand Up @@ -5030,7 +5030,7 @@ TickType_t uxTaskResetEventItemValue( void )
/* Should not get here if all enums are handled.
* Artificially force an assert by testing a value the
* compiler can't assume is const. */
configASSERT( pxTCB->ulNotifiedValue[ uxIndexToNotify ] == ~0UL );
configASSERT( xTickCount == ( TickType_t ) 0 );
break;
}

Expand Down

0 comments on commit 700c1cf

Please sign in to comment.