Checkingmain.c...main.c:3:25:style:misraviolation(use--rule-texts=<file> to get proper output) [misra-c2012-8.2]staticvoidexample_func(size_tnum,intparam1[num]);^
However, if I instead, define a constant as in the code below, the rule 8.2 violation disappears:
Hi,
In the following example, cppcheck 2.7 produces a warning for violating MISRA rule 8.2 on line 3:
The command launched is the following:
And the output is:
However, if I instead, define a constant as in the code below, the rule 8.2 violation disappears:
Should it be reported as rule 18.8 violation instead?
Thanks
Last edit: Roberto Geografo 2024-05-07
Hello, Roberto!
Yes, it's should be reported as 18.8. We've created a ticket for your issue.