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 #641, string operations on GCC9 #642

Merged
merged 1 commit into from
May 8, 2020

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Ensure clean build, no warnings on string operations using GCC 9.3.0.

Fixes #641

Testing performed
Build code with default config, SIMULATION=native BUILDTYPE=release on GCC 9.3.0.
Confirm successful build with no warning.
Confirm unit tests passing
Sanity check CFE operation

Expected behavior changes
No impact to behavior

System(s) tested on
Ubuntu 20.04 LTS 64 bit

Additional context
Some string ops were genuinely incorrect (particularly in UT) but some were perfectly OK and handled correctly per the C spec. In particular the new "rules" that GCC9 warns about make the strncat() library function (and some others) somewhat off-limits even if used correctly.

The new string truncation checking feature of GCC generates a boatload of false positives and basically makes certain library functions generate warnings even if used correctly, some other projects have been adding -Wno-stringop-truncation compiler flag to avoid this. However with these workarounds CFE is able to build without adding this, but apps might need it.

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

Ensure clean build, no warnings on string operations using GCC 9.3.0.

Some string ops were genuinely incorrect (particularly in UT) but some
were perfectly OK and handled correctly per the C spec.  In particular
the new "rules" that GCC9 warns about make the strncat library function
(and some others) somewhat off-limits even if used correctly.
@jphickey jphickey added bug CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Apr 27, 2020
@astrogeco
Copy link
Contributor

CCB 2020-04-29 : APPROVED

@astrogeco astrogeco added CCB-20200429 CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels May 5, 2020
@skliper skliper added this to the 6.8.0 milestone May 7, 2020
@astrogeco astrogeco changed the base branch from master to integration-candidate May 8, 2020 18:05
@astrogeco astrogeco merged commit 0f363dd into nasa:integration-candidate May 8, 2020
@jphickey jphickey deleted the fix-641-stringops branch May 21, 2020 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Many string truncation warnings with newer GCC
3 participants