Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warning in config assert() on 64 bit architecture #158

Merged
merged 7 commits into from
Sep 7, 2020
Merged

Fix compiler warning in config assert() on 64 bit architecture #158

merged 7 commits into from
Sep 7, 2020

Conversation

RichardBarry
Copy link
Contributor

The following code was used to force an assert but resulted in
compiler warnings on 64-bit architectures:
configASSERT( pxTCB->ulNotifiedValue[ uxIndexToNotify ] == ~0UL );

Hence it was replaced with the following, which also forces an assert,
but ensure the data types being compared are the same on all
architectures:
configASSERT( xTickCount == ( TickType_t ) 0 );

RichardBarry and others added 7 commits August 28, 2020 12:42
an assert, but caused warnings on 64-bit architectures because
it compares a uint32_t with a 64-bit number.
configASSERT( pxTCB->ulNotifiedValue[ uxIndexToNotify ] == ~0UL );

The changed to configASSERT( xTickCount == ( TickType_t ) 0 );
which has the same effect of forcing an assert, but without
the warning.
configASSERT( pxTCB->ulNotifiedValue[ uxIndexToNotify ] == ~0UL );

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

Because the former generates a warning on 64-bit architectures.
@cobusve cobusve merged commit 700c1cf into FreeRTOS:master Sep 7, 2020
laroche pushed a commit to laroche/FreeRTOS-Kernel that referenced this pull request Apr 18, 2024
* DNS.c commit

* IP.c commit

* Add various source & header files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants