We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The following line in unit tests makes an implicit conversion between OS_OBJECT_ID_UNDEFINED (an osal_id_t) and an integer:
OS_OBJECT_ID_UNDEFINED
cFE/modules/es/ut-coverage/es_UT.c
Line 4522 in c161cf0
This is allowed with the current permissive type definition, but fails when building with strict types.
To Reproduce Use a type-safe definition for osal_id_t. This conversion fails and results in a compiler error.
Expected behavior Should use OS_ObjectIdToInteger() here - easiest way to make it work without changing logic.
OS_ObjectIdToInteger()
System observed on: Ubuntu 21.10
Reporter Info Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
Fix nasa#2024, osal_id_t type conversion in es_UT.c
3eaf3ea
Corrects the implicit type conversion from an osal_id_t to an integer, making it explicit by using the OS_ObjectIdToInteger() conversion function.
Merge pull request #2025 from jphickey:fix-2024-ut-osal-id-conversion
1e270eb
Fix #2024, osal_id_t type conversion in es_UT.c
jphickey
Successfully merging a pull request may close this issue.
Describe the bug
The following line in unit tests makes an implicit conversion between
OS_OBJECT_ID_UNDEFINED
(an osal_id_t) and an integer:cFE/modules/es/ut-coverage/es_UT.c
Line 4522 in c161cf0
This is allowed with the current permissive type definition, but fails when building with strict types.
To Reproduce
Use a type-safe definition for osal_id_t. This conversion fails and results in a compiler error.
Expected behavior
Should use
OS_ObjectIdToInteger()
here - easiest way to make it work without changing logic.System observed on:
Ubuntu 21.10
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: