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 #85, remove numeric pipe ID from event string #86

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented Feb 26, 2021

Describe the contribution
Remove the numeric pipe ID from the event string, which solves the problem when strict types are used and the value isn't a simple integer.

Fixes #85

Testing performed
Build with strict resource ID types, confirm printf format specifier mismatch error in #85 is gone.

Expected behavior changes
No more compiler error.

System(s) tested on
Ubuntu 20.04

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

@skliper
Copy link
Contributor

skliper commented Feb 26, 2021

Is the number all that useful in this context? Maybe just remove from the message?

@jphickey
Copy link
Contributor Author

Is the number all that useful in this context? Maybe just remove from the message?

Probably not, this was just the smallest change to make it safe.

Truth is, only the "TO_LAB_RemovePacket" printed the pipe ID - the inverse operation in "TO_LAB_AddPacket" is almost identical except it doesn't print the pipe ID...

Numeric pipe ID is not really relevant and fails when strict types
are used. This makes "RemovePkt" consistent with "AddPkt" and takes
it out of the event string.
@jphickey jphickey changed the title Fix #85, use proper printf conversion for pipe ID Fix #85, remove numeric pipe ID from event string Feb 26, 2021
@jphickey
Copy link
Contributor Author

Updated per @skliper comment/suggestion ... this has the added bonus of fixing the complaint about whitespace/format check too.

@skliper skliper added this to the 2.5.0 milestone Mar 5, 2021
@skliper skliper self-assigned this Mar 5, 2021
@skliper skliper merged commit b6f6fb9 into nasa:main Mar 5, 2021
@jphickey jphickey deleted the fix-85-printf-conversion branch June 8, 2021 18:22
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.

Fix Pipe ID printf to be strict type-safe compatible
2 participants