Fix #1208, typesafe definition of osal_id_t #1209
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the contribution
Modifies the osal_id_t typedef to be a non-integer value. The intent is to catch cases where it inappropriately being used as an integer value.
This is transparent so long as the osal_id_t typedef and provided check and conversion routines are used.
Fixes #1208
Testing performed
Build and sanity check CFE and OSAL with and without OSAL_OMIT_DEPRECATED flag
Expected behavior changes
When OSAL_OMIT_DEPRECATED is enabled (opt-in) this will catch misuse of OSAL IDs as integers, or failure to use correct
osal_id_ttypedef to hold the value.System(s) tested on
Ubuntu 21.10
Additional context
OSAL and CFE should all be compliant, but CFS apps probably are not yet compliant with this. Hence why it is "opt-in" via OSAL_OMIT_DEPRECATED flag, like other similar changes done in the past.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.