Misra: Fix FP, rule 15.6
This commit is contained in:
parent
a47a5e55e4
commit
892f11b7f1
|
@ -169,9 +169,12 @@ int misra_15_5() {
|
|||
void misra_15_6() {
|
||||
if (x!=0); // 15.6
|
||||
else{}
|
||||
#if A
|
||||
|
||||
#if A>1 // no-warning
|
||||
(void)0;
|
||||
#endif
|
||||
|
||||
do {} while (x<0); // no-warning
|
||||
}
|
||||
|
||||
void misra_15_7() {
|
||||
|
|
|
@ -641,7 +641,9 @@ def misra_15_6(rawTokens):
|
|||
tok1 = None
|
||||
for token in rawTokens:
|
||||
if token.str in ['if', 'for', 'while']:
|
||||
if token.previous and token.previous.str == '#':
|
||||
if simpleMatch(token.previous, '# if'):
|
||||
continue
|
||||
if simpleMatch(token.previous, "} while"):
|
||||
continue
|
||||
state = 1
|
||||
indent = 0
|
||||
|
|
Loading…
Reference in New Issue