diff --git a/addons/misra.py b/addons/misra.py index a48629b986f..41ecce180e0 100755 --- a/addons/misra.py +++ b/addons/misra.py @@ -2291,7 +2291,7 @@ def get_category(essential_type): rhs_category = get_category(rhs) if lhs_category and rhs_category and lhs_category != rhs_category and rhs_category not in ('signed','unsigned'): self.reportError(tok, 10, 3) - if bitsOfEssentialType(lhs) < bitsOfEssentialType(rhs): + if bitsOfEssentialType(lhs) < bitsOfEssentialType(rhs) and (lhs != "bool" or tok.astOperand2.str not in ('0','1')): self.reportError(tok, 10, 3)