Synopsis: | The right-hand operand of the logical OR operator shall not contain any side-effects because it is conditionally executed. |
Language: | C |
Severity Level: | 4 |
Category: | EXPRESSIONS |
Description: |
It is clearer to use an if statement to make the conditional execution explicit.
Example: if ( (a > b ) || i++ ) /* WRONG, i not always changed */ |