CWE-563

Assignment to Variable without Use
AI Translation Available

The variable's value is assigned but never used, making it a dead store.

Status
draft
Abstraction
base

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.

Common Consequences

other
Impacts
quality degradation varies by context

Detection Methods

automated static analysis

Potential Mitigations

Phases:
implementation
Descriptions:
• Remove unused variables from the code.