MISRAC2012-Rule-16.1 : The body of this switch statement is not well-formed - Printable Version +- MISRA Discussion Forums (https://forum.misra.org.uk) +-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4) +--- Forum: MISRA C:2012 and MISRA C:2023 guidelines (https://forum.misra.org.uk/forumdisplay.php?fid=21) +---- Forum: 8.16 Switch statements (https://forum.misra.org.uk/forumdisplay.php?fid=171) +---- Thread: MISRAC2012-Rule-16.1 : The body of this switch statement is not well-formed (/showthread.php?tid=1534) |
MISRAC2012-Rule-16.1 : The body of this switch statement is not well-formed - jsleeman - 26-03-2020 Hello everyone, I have 2 functions below, the top one, I get a MISRAC2012-Rule-16.1 warning, the second one I do not get the warning, the only difference between them is where 'i' is declared. Is the warning I am seeing correct? If it is why is it not allowed? I have looked through the 16.x rules and I could not see anything that suggested I could it was banned. I am using IAR C-STAT to do the analysis. Code: /*************** Thanks, James Re: MISRAC2012-Rule-16.1 : The body of this switch statement is not well-formed - misra-c - 17-04-2020 There are no violations of rule 16.1 in your example. |