What it is
The variable's value is assigned but never used, i.e., is a dead store. That is, after the assignment, the variable is either assigned another value or goes out of scope.
Impact on systems
| Scope | Impact |
|---|---|
| Other | Quality Degradation, Varies by Context This weakness could be an indication of a bug in the program or a deprecated variable that was not removed and is an indication of poor quality. This could lead to further bugs and the introduction of weaknesses. |
How to prevent it
Implementation
Remove unused variables from the code.
Source: MITRE CWE catalog · Official entry on the MITRE website