-
Notifications
You must be signed in to change notification settings - Fork 220
Adding a test with cppcheck for Travis CI #56
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,9 +127,8 @@ static int percent_passed(TestStats * t) | |
| { | ||
| if(t->n_failed == 0 && t->n_errors == 0) | ||
| return 100; | ||
| else if(t->n_checked == 0) | ||
| if(t->n_checked == 0) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these style changes or logic changes? Are these because cppcheck indicated an issue? As least for cppcheck 1.74 no issues were detected in the src dir. The test dir did mention the following: Which seems to indicate that there is a redundant null check. The following resolves this: Would you mind including this into your pull request, to remove all errors/warnings before enabling the check?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No it is very small modification, so I putted it with cppcheck. |
||
| return 0; | ||
| else | ||
| return (int)((float)(t->n_checked - (t->n_failed + t->n_errors)) / | ||
| (float)t->n_checked * 100); | ||
| return (int)((float)(t->n_checked - (t->n_failed + t->n_errors)) / | ||
| (float)t->n_checked * 100); | ||
| } | ||
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.
If you are interested in adding the LGPL header to the file, can you do so in a separate commit?
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.
Ok. #57