Mixed types in expressions cc4m_logo_inline

IDSTAT-7
TitleDo not mix operand or operator types in an expression.
PriorityStrongly recommended
Severity level4
DescriptionDo not mix operand or operator types in an expression. For example, do not mix logical and numerical operators in an expression.
RationaleMixing operand or operator types in expressions can cause unexpected results and may lead to errors in case of true incompatibilities.

Avoid:

d = a * b && c;

Instead use:

isValid = a * b > 0;
d       = isValid && c;