| Follow each flow control primitive ('if', 'else', 'while', 'for', 'do' and 'switch') by a block enclosed by braces, even if the block is empty or contains only one line. |
| For boolean expressions ('if', 'for', 'while', 'do' and the first operand of the ternary operator '?:') involving non-boolean values, always use an explicit test of equality or non-equality. |
| Avoid conditional expressions that always have the same result. |
| Follow each non-empty case statement block in a switch statement with a break statement. |
| Do not alter a control variable in the body of a for statement. |
| Do not alter a control variable more than once in a for, do or while statement. |
| The control variable in a for loop should be tested against a constant value, not a function or expression. |
| Do not use 'goto'. |
| Ensure that every compound statement except the body of a switch statement has a single entry point and (barring the propagation of C++ exceptions) a single exit point. |
| For functions with non-void return type, ensure all paths have a return statement that contains an expression of the return type. |
| Include explicit cases for all alternatives in multi-way conditional structures. |
| Declare for loop control variables within the for statement instead of using an existing variable. |