The variable's value is assigned but never used, making it a dead store.
Extended Description
After the assignment, the variable is either assigned another value or goes out of scope. It is likely that the variable is simply vestigial, but it is also possible that the unused variable points out a bug.
ThreatScore
Threat Mapped score: 0.0
Industry: Finiancial
Threat priority: Unclassified
Observed Examples (CVEs)
No observed examples available.
Related Attack Patterns (CAPEC)
N/A
Attack TTPs
N/A
Modes of Introduction
Phase
Note
Implementation
N/A
Common Consequences
Impact: Quality Degradation, Varies by Context — Notes: 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.
Potential Mitigations
Implementation: Remove unused variables from the code. (N/A)
Applicable Platforms
None listed.
Demonstrative Examples
Intro: The following code excerpt assigns to the variable r and then overwrites the value without using it.