Fixed #8657 (false postive: MISRA rule 15.7)
This commit is contained in:
parent
6c55d27f19
commit
016340f77d
|
@ -1479,6 +1479,8 @@ class MisraChecker:
|
|||
continue
|
||||
if not simpleMatch(scope.bodyStart, '{ if ('):
|
||||
continue
|
||||
if scope.bodyStart.col > 0:
|
||||
continue
|
||||
tok = scope.bodyStart.next.next.link
|
||||
if not simpleMatch(tok, ') {'):
|
||||
continue
|
||||
|
|
|
@ -397,6 +397,9 @@ void misra_15_7() {
|
|||
var2 = 10u;
|
||||
} // no-warning
|
||||
}
|
||||
|
||||
if (a==2) {} else if (b==4) {} // 15.7
|
||||
if (a==2) {} else { if (b==4) {} } // no-warning
|
||||
}
|
||||
|
||||
void misra_16_2() {
|
||||
|
|
Loading…
Reference in New Issue