From 8b509a158ff10e4ad6187567a188fe8a3c8fdfcc Mon Sep 17 00:00:00 2001 From: KMilhan Date: Thu, 31 Aug 2017 23:06:46 +0900 Subject: [PATCH] Make MISRA C 2012 12.2 work on C++ (#946) --- addons/misra.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/misra.py b/addons/misra.py index 70bd9c517..4382027da 100644 --- a/addons/misra.py +++ b/addons/misra.py @@ -587,7 +587,7 @@ def misra_12_2(data): continue maxval = 0 for val in token.astOperand2.values: - if val.intvalue > maxval: + if val.intvalue and val.intvalue > maxval: maxval = val.intvalue if maxval == 0: continue