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 #1016, bogus warning in strncpy #1018

Merged

Conversation

jphickey
Copy link
Contributor

Describe the contribution

Add an extra write of a null char which squelches a warning.

Fixes #1016

Testing performed
Build and sanity check CFE with BUILDTYPE=release on focal

Expected behavior changes
None - just avoid extraneous warning

System(s) tested on
Ubuntu 20.04

Additional context
Buffer was already zero'ed out via previous memset, so this extra zero really has no effect except (possibly) using an extra CPU cycle. This just appeases some over-zealous compiler warning logic.

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

Add an extra write of a null char which squelches a warning.
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Nov 16, 2020
@jphickey
Copy link
Contributor Author

@astrogeco , @skliper -- given that this is a trivial one liner that fixes a compiler warning - it might be worth fast tracking into the next baseline.

@astrogeco
Copy link
Contributor

CCB 2020-11-18 APPROVED

@astrogeco astrogeco changed the base branch from main to integration-candidate November 23, 2020 06:13
@astrogeco astrogeco added IC-20201124 and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Nov 23, 2020
@astrogeco astrogeco merged commit 113abb9 into nasa:integration-candidate Dec 1, 2020
astrogeco added a commit to astrogeco/cFS that referenced this pull request Dec 1, 2020
astrogeco added a commit to astrogeco/cFS that referenced this pull request Dec 2, 2020
@jphickey jphickey deleted the fix-1016-fix-warning branch December 3, 2020 17:53
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
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.

strncpy triggers a build failure in Ubuntu Focal release builds
3 participants