I get this 15.6 rule violation : shall be a compound-statement ... as if recognized as a while instead of a do while.
It seems to be waiting for the braces around ;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
src\main.c:330:5: style: Required ... [misra-c2012-15.6]
while (value < 2U);
^
For information, when I add/remove the comment I have to delete temporary files in cppcheck-build-dir. As a single comment change does not retrigger the analysis and so previous results are used.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have one minor issue with MISRA 15.6 rule :
Works fine, but with a comment on do line :
I get this 15.6 rule violation : shall be a compound-statement ... as if recognized as a
while
instead of ado while
.It seems to be waiting for the braces around
;
Hi Daniel, should I keep post my issues here or is there a better place somewhere else ? I don't success accessing to TRAC.
I have few other things to discuss about MISRA, I guess I have another false positive with the latest rules implemented on Cppcheck v2.6.
Thank you
Julien
I think it sounds better that you report it in trac directly. Can you create a htpasswd hash and send it to me?
Trac ticket #10560 https://trac.cppcheck.net/ticket/10560
Last edit: Julien 2021-10-26
can you please tweak the example code. I get this syntax error:
10560.c:4:3: error: syntax error: keyword 'while' is not allowed in global scope [syntaxError]
Please try with this code :
For information, when I add/remove the comment I have to delete temporary files in cppcheck-build-dir. As a single comment change does not retrigger the analysis and so previous results are used.
Thanks! I can reproduce. I have created https://trac.cppcheck.net/ticket/10583