dist/tools/cppcheck: fix all Cppcheck 1.82 errors#12764
dist/tools/cppcheck: fix all Cppcheck 1.82 errors#12764kaspar030 merged 12 commits intoRIOT-OS:masterfrom
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. |
kaspar030
left a comment
There was a problem hiding this comment.
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! |
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
cppcheckerrors are making merging #12558 more difficult so this PR fixes this.Testing procedure
./dist/tools/cppcheck/check.shno errors should appearPlease take a closer look at 1e671ac and c2f593f,
1e671ac I'm not sure if
int sig = -1is the best initial value forsig, although shouldn't really matter since its updated in the while loop..c2f593f is because
RTT_FREQUENCYdoesn'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.