Description:
ONE detects arithmetic expressions that always return one of their operands' value. This message is produced only for expressions that have at least one operand which is not a compile-time constant. The examined operations are described below.
+) operation has no effect when one of the addends is
zero (0).-) operation has no effect when the subtrahend is
zero (0).*) operation has no effect when either the multiplicand or
the multiplier is one (1)./) operation has no effect when the divisor is one
(1).%) operation has no effect when right operand is
either greater either less than zero, and absolute value of left
operand is less than absolute value of right operand.
In this case x % y == x or x % y == -x.Example: