-
Notifications
You must be signed in to change notification settings - Fork 4.6k
[CORE] [Clang]Cleanup clang-analyzer warnings #46229
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
Conversation
|
cms-bot internal usage |
| double s2 = 2.0 * t * t; | ||
|
|
||
| for (a = 0, b = 0; b < n; b += 2 * dual) { | ||
| for (b = 0; b < n; b += 2 * dual) { |
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 like a is not used in this loop
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46229/42041 |
|
A new Pull Request was created by @smuzaffar for master. It involves the following packages:
@Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
| if (failed) { | ||
| i--; | ||
| for (; i <= 0; i--) | ||
| for (; i >= 0; i--) |
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.
kind of infinite loop for i=-1 e.g. when https://github.com/cms-sw/cmssw/blob/master/Validation/Performance/bin/array.c#L17-L23 failed for first item i=0.
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.
and i think it was memory leak for i>0
|
How about we remove all these, as well as the |
sounds good to me |
|
@makortel , you meant |
Ah, yes, |
|
done #46235 . If that looks good then I can close this PR |
|
closing in favor of #46235 |
This PR fixes clang-analyzer warnings https://cmssdt.cern.ch/SDT/jenkins-artifacts/ib-static-analysis/CMSSW_14_2_X_2024-10-02-1100/el8_amd64_gcc12/build-logs/ .