V7001. Operands of a binary operator are equivalent.
The analyzer has detected a code fragment that may contain a logical error: operands of an operator are equivalent.
The example:
if (a != 0 && a != 0)
In this case, the identical expressions a != 0 surround the && operator, which indicates an unintended error. Most likely, another variable should be checked:
if (a != 0 && b != 0)
The second check may also be redundant.
The diagnostic rule also considers non-identical but equivalent expressions.
The example:
if ((a * b) > (b * a))
The analyzer reports a warning because multiplication is commutative, and the expressions will evaluate to the same result.