Misra: Fix FP, rule 16.6

This commit is contained in:
Daniel Marjamäki 2017-04-17 09:07:45 +02:00
parent 196b530ede
commit 0adc4f0789
2 changed files with 8 additions and 0 deletions

View File

@ -226,6 +226,12 @@ void misra_16_6() {
default:
break;
}
switch (x) {
case 1: {break;}
case 2: {break;}
default: {break;}
}
}
void misra_16_7() {

View File

@ -739,6 +739,8 @@ def misra_16_6(data):
count = count + 1
elif tok.str == '{':
tok = tok.link
if simpleMatch(tok.previous.previous,'break ;'):
count = count + 1
elif tok.str == '}':
break
tok = tok.next