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 #58, scrub all printf format codes #170

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Use the correct printf format code and typecast for printing various values in log messages and events.

Fixes #58

Testing performed
Build and run tests on RTEMS and 32-bit PowerPC

Expected behavior changes
Build succeeds without warnings or errors

System(s) tested on
RTEMS 4.11.3 on pc686 + QEMU
Yocto/Poky Linux on PPC 7400 + QEMU

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

@jphickey
Copy link
Contributor Author

General rule of thumb - OSAL status codes should be printed as decimal, CFE status codes should be printed as hex, prefer use of the "long" versions of these types (%ld, %lx ,%lu) as this gets the least risk of value truncation/overflow, and cast the value to the intended type since typedef's may vary from system to system.

@jphickey jphickey force-pushed the fix-58-scrub-format-codes branch 3 times, most recently from c2e686b to ed9c8ee Compare January 13, 2022 18:38
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jan 13, 2022
Use the correct printf format code and typecast for printing
various values in log messages and events.
@astrogeco astrogeco merged commit 8d71b91 into nasa:main Jan 18, 2022
@astrogeco astrogeco removed the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jan 19, 2022
@astrogeco
Copy link
Contributor

astrogeco commented Jan 19, 2022

CCB:2022-01-19 APPROVED

  • Helps with build/run on RTEMS

@jphickey jphickey deleted the fix-58-scrub-format-codes branch March 11, 2022 15:48
@skliper skliper added this to the Draco milestone Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CF printing of fixed-width integers
3 participants