-
Notifications
You must be signed in to change notification settings - Fork 202
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 #2024, osal_id_t type conversion in es_UT.c #2025
Conversation
Corrects the implicit type conversion from an osal_id_t to an integer, making it explicit by using the OS_ObjectIdToInteger() conversion function.
Do we have an established convention for ID macros, or at minimum recommended approach? I seem to recall some of them are the correct type from within the macro (might have just been for unit tests?)... others are "raw" and always need to be converted. Although it's likely a bigger change if they are already converted all over the place, might be friendlier (backwards compatabile) where macros are used to do the conversion inside? EDIT: I guess for static initializers you still need raw... but maybe a naming convention update at some point? Typesafe (_TS) vs (_RAW) or something? |
Any initializer should always be of the correct type for the value it initializes. This should be the default anyway. It should only have a suffix/extension if this is NOT the case for whatever reason, and that reason should be a good one if we have to have it at all. (The mess w/MsgId vs MID Value comes to mind, we should be trying to get away from defining a MID as a number, as I've said for years, but in the meantime we can differentiate that a "MID VALUE" is different than a "MID"). However, in this case, the OSAL_OBJECT_ID_UNDEFINED has always been of the |
CCB:2022-01-19 APPROVED |
*cFE* nasa/cFE#2015, Add FS Functional test nasa/cFE#2012, Fix mismatched foreach in cmake function nasa/cFE#2013, Improved code highlighting in cFE Application Developers Guide nasa/cFE#2027, CFE_FS_ParseInputFileNameEx avoid uninit var nasa/cFE#2031, Fix array length calculation for perf structs nasa/cFE#2023, Limit SBR UT loops nasa/cFE#2029, Initialize BlockData in ES UT nasa/cFE#2025, Fix osal_id_t type conversion in es_UT.c
*cFE* nasa/cFE#2011, Reuse CodeQL, Static Analysis, and Format Check nasa/cFE#2015, Add FS Functional test nasa/cFE#2012, Fix mismatched foreach in cmake function nasa/cFE#2013, Improved code highlighting in cFE Application Developers Guide nasa/cFE#2027, CFE_FS_ParseInputFileNameEx avoid uninit var nasa/cFE#2031, Fix array length calculation for perf structs nasa/cFE#2023, Limit SBR UT loops nasa/cFE#2029, Initialize BlockData in ES UT nasa/cFE#2025, Fix osal_id_t type conversion in es_UT.c
Combines: nasa/cFE#2019, cFE v7.0.0-rc4+dev60 nasa/osal#1212, osal v6.0.0-rc4+dev29 nasa/sch_lab#105, sch_lab v2.5.0-rc4+dev13 Includes: *cFE* nasa/cFE#2033, Add CFE_ES_AppInfo_t element documentation nasa/cFE#2011, Reuse CodeQL, Static Analysis, and Format Check nasa/cFE#2015, Add FS Functional test nasa/cFE#2012, Fix mismatched foreach in cmake function nasa/cFE#2013, Improved code highlighting in cFE Application Developers Guide nasa/cFE#2027, CFE_FS_ParseInputFileNameEx avoid uninit var nasa/cFE#2031, Fix array length calculation for perf structs nasa/cFE#2023, Limit SBR UT loops nasa/cFE#2029, Initialize BlockData in ES UT nasa/cFE#2025, Fix osal_id_t type conversion in es_UT.c *osal* nasa/osal#1206, Search global and local symbol tables nasa/osal#1201, Add missing space to UtAssert_STUB_COUNT nasa/osal#1202, Add UINT8 and UINT16 equivalents for UtAssert_UINT32_<Comparison> macros nasa/osal#1203, correct warnings on gcc11 nasa/osal#1211, Set output in OS_stat handler nasa/osal#1190, Reuse CodeQL, Static Analysis, Format Check *other* nasa/sch_lab#104, Add option to configure base tick rate *Continuous Integration Updates* nasa/PSP#317, Reuse CodeQL, Static Analysis, and Format Check nasa/sample_lib#72, Reuse CodeQL, Static Analysis, and Format Check nasa/sample_app#162, Reuse CodeQL, Static Analysis, and Format Check nasa/ci_lab#100, Reuse CodeQL, Static Analysis, and Format Check nasa/to_lab#111, Reuse CodeQL, Static Analysis, and Format Check nasa/tblCRCTool#59, Reuse CodeQL, Static Analysis, and Format Check nasa/elf2cfetbl#97, Reuse CodeQL, Static Analysis, and Format Check nasa/cFS-GroundSystem#200, Reuse CodeQL, Static Analysis, and Format Check Co-authored-by: Ariel Adams <ArielSAdamsNASA@users.noreply.github.com> Co-authored-by: Jacob Hageman <skliper@users.noreply.github.com> Co-authored-by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored-by: Kurtis Dinelle <kurtjd@users.noreply.github.com> Co-authored-by: Paul <paulober@users.noreply.github.com> Co-authored-by: Adrien Chardon <Nodraak@users.noreply.github.com>
Describe the contribution
Corrects the implicit type conversion from an osal_id_t to an integer, making it explicit by using the OS_ObjectIdToInteger() conversion function.
Fixes #2024
Testing performed
Build with strict osal_id_t type definition. Run all tests.
Expected behavior changes
None.
System(s) tested on
Ubuntu 21.10
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.