Synopsis: | Each expression and statement shall have an effect. |
Language: | C |
Severity Level: | 6 |
Category: | Statement and Blocks |
Description: |
Justification Specified expressions that cause no effect clutter the program text, leaving the puzzle why the expression or statement is there to the reader. Example i == 1; /* WRONG: "i" has no effect. */ j + 1; /* WRONG: "j" has no effect. */ i = 1; /* RIGHT */ n = j + 1; /* RIGHT */ |