From 700c1cf9c630e19e9cd683c661dc22701fad2b2a Mon Sep 17 00:00:00 2001 From: RichardBarry <3073890+RichardBarry@users.noreply.github.com> Date: Sun, 6 Sep 2020 22:08:00 -0700 Subject: [PATCH] Fix compiler warning in config assert() on 64 bit architecture (#158) * 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. --- tasks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks.c b/tasks.c index ef1bde13f..072429183 100644 --- a/tasks.c +++ b/tasks.c @@ -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; } @@ -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; }