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 #287: cppcheck warnings #291

Merged
merged 1 commit into from
Nov 19, 2019

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Replace use of 1<<31 and INT_MAX with UINT32_MAX/2 which should
squelch the cppcheck warnings about the left shift as well as being
more correct (the values in question are uint32's, not int's).

Also address two false positives about a return value being unassigned,
by simply initializing the value to be 0.

Fixes issue #287

Testing performed
Build coverage test and ensure all tests passing and line coverage is unaffected
Build and run CFE and confirm no effect.

Ran cppcheck and confirmed that warnings are gone.

Expected behavior changes
No impact to behavior.

System(s) tested on:
Ubuntu 18.04 LTS, 64 bit.

Contributor Info
Joseph Hickey, Vantage Systems, Inc.

Community contributors
You must attach a signed CLA (required for acceptance) or reference one already submitted

Replace use of (1<<31) and (INT_MAX) with (UINT32_MAX/2) which should
squelch the cppcheck warnings about the left shift as well as being
more correct (the values in question are uint32's, not int's).

Also address two false positives about a return value being unassigned,
by simply initializing the value to be 0.
@skliper skliper changed the base branch from master to ic-20191115 November 19, 2019 14:38
@skliper skliper merged commit 0f10e0e into nasa:ic-20191115 Nov 19, 2019
@jphickey jphickey deleted the fix-287-cppcheck-warnings branch December 9, 2019 15:07
@skliper skliper added this to the 5.1.0 milestone Jun 1, 2020
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Removes untraced capabilities to decompress libraries or
apps on load.  For non-startup apps, FS can be used.  For
startup, recommendation is to compress/decompress as part
of boot/startup vs individual applications/libs at load.

Also fixes nasa#291, by deprecating decompress it can be moved
to the FS app.

Also makes nasa#135 N/A, static code analysis issues in decompress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants