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

issue #305, Resolve cppcheck warning ut_stubs #306

Merged
merged 1 commit into from
Dec 30, 2019
Merged

issue #305, Resolve cppcheck warning ut_stubs #306

merged 1 commit into from
Dec 30, 2019

Conversation

avan989
Copy link
Contributor

@avan989 avan989 commented Dec 11, 2019

Describe the contribution
resolve cppcheck warning.

Testing performed
Steps taken to test the contribution:

  1. make ENABLE_UNIT_TESTS=TRUE SIMULATION=native prep
  2. make
  3. make install
  4. make test
  5. Verify passing unit-test
  6. cppcheck --force --inline-suppr --std=c99 --language=c --error-exitcode=1 enable=warning,performance,portability,style --suppress=variableScope --inconclusive osal/src 2>osal.txt

System(s) tested on:

  • Hardware
  • OS: Ubuntu 18.04
  • osal 5.03

Contributor Info
Anh Van, NASA Goddard

Copy link
Contributor

@jphickey jphickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just request one minor change to remove the unused counter where noted.

@@ -191,10 +191,12 @@ void UT_CheckForOpenSockets(void)
{
id = i;
UT_FIXUP_ID(id, UT_OBJTYPE_QUEUE);
UtAssert_Failed("UT_Queue %d left open. ID=%x\n", (int)i, (unsigned int)id);
++InUse;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend just removing the InUse counter here. This was probably a remnant from a previous code structure that printed a single failure at the end of the loop, but then the assert was moved to show each ID that was left open. There isn't much value in just printing an increment counter.

@avan989
Copy link
Contributor Author

avan989 commented Dec 11, 2019

updated.

Copy link
Contributor

@jphickey jphickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now

@skliper skliper added the CCB:Approved Indicates code review and approval by community CCB label Dec 18, 2019
@skliper skliper added this to the 5.1.0 milestone Dec 18, 2019
@skliper
Copy link
Contributor

skliper commented Dec 18, 2019

CCB 20191218 - Reviewed and approved for IC

@skliper skliper changed the base branch from master to merge-20191230 December 30, 2019 21:07
@skliper skliper merged commit 40c574f into nasa:merge-20191230 Dec 30, 2019
skliper added a commit that referenced this pull request Dec 30, 2019
Fix #295, #298, #305, #307, #308,
    #313, #314, #316, #321, #323
Reviewed and approved at 2019-12-18 CCB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants