Make MISRA C 2012 12.2 work on C++ (#946)
This commit is contained in:
parent
dce942197c
commit
8b509a158f
|
@ -587,7 +587,7 @@ def misra_12_2(data):
|
||||||
continue
|
continue
|
||||||
maxval = 0
|
maxval = 0
|
||||||
for val in token.astOperand2.values:
|
for val in token.astOperand2.values:
|
||||||
if val.intvalue > maxval:
|
if val.intvalue and val.intvalue > maxval:
|
||||||
maxval = val.intvalue
|
maxval = val.intvalue
|
||||||
if maxval == 0:
|
if maxval == 0:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue