-
Notifications
You must be signed in to change notification settings - Fork 219
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
Conversation
There was a problem hiding this 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.
src/ut-stubs/utstub-helpers.c
Outdated
@@ -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; |
There was a problem hiding this comment.
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.
updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now
CCB 20191218 - Reviewed and approved for IC |
Describe the contribution
resolve cppcheck warning.
Testing performed
Steps taken to test the contribution:
System(s) tested on:
Contributor Info
Anh Van, NASA Goddard