-
Notifications
You must be signed in to change notification settings - Fork 2k
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
dist/tools/cppcheck: fix all Cppcheck 1.82 errors #12764
Conversation
Sorry, I commented in the commit view, @fjmolinas can you find the spots or should I move the comments? edit I copied them over. |
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.
LGTM, two little changes please.
BTW, with "Cppcheck 1.89" on my arch system, I get a lot more errors. |
Semicolon missing just before |
Yep my bad, fixed. |
Argh annoying, I'll address this later today, need to switch to another subject now. |
Or deal with it later on, I think it would be good to get rid of #12558. I could open an issue and deal with it later. |
sure! small steps are good. please squash! |
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.
ACK.
Preprocesor fails to evaluate the if condicion on L91-92 because RTT_FREQUENCY is not defined, and therefore a division by 0 occurs. TO avoid this replicate the RTT_FREQUENCY undefined warning.
7b7b7ec
to
fe180da
Compare
Opened #12771, I tackle it as soon as possible. |
@kaspar030 can I hit the button? |
Thanks for dealing with this! |
Contribution description
cppcheck
errors are making merging #12558 more difficult so this PR fixes this.Testing procedure
./dist/tools/cppcheck/check.sh
no errors should appearPlease take a closer look at 1e671ac and c2f593f,
1e671ac I'm not sure if
int sig = -1
is the best initial value forsig
, although shouldn't really matter since its updated in the while loop..c2f593f is because
RTT_FREQUENCY
doesn't have a default value so it results in a division by 0. Maybe there is a best way than duplicating the warning.If preferred I can squash all commits fixing same errors.
Issues/PRs references
#12558 can benefit from this.