A variable which is not modified shall be const qualified
A variable which is not modified shall be const qualified.
Declaring a variable const reduces the chances that you modify
the variable by accident.
The checker flags function parameters or local variables that are not const-qualified but never modified in the function body. Function parameters of integer, float, enum and boolean types are not flagged.
If a variable is passed to another function by reference or pointers, the checker assumes that the variable can be modified. These variables are not flagged.
If you expect a rule violation but do not see it, refer to Coding Standard Violations Not Displayed.
| Group: Declarations |
| Category: Required |