G-2145: Never self-assign a variable.
Minor
Maintainability
Reason
There is no reason to assign a variable to itself. It is either a redundant statement that should be removed, or it is a mistake where some other value was intended in the assignment.
Example (bad)
1 2 3 4 5 6 7 8 |
|
Example (good)
1 2 3 4 5 6 7 8 |
|