CWE Database
/

CWE-563

Back to CWE list

CWE-563

Assignment to Variable without Use

Base
Draft

Description

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

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.

Parent Weaknesses (ChildOf)

Common Consequences

Scope

Other

Impact

Quality Degradation, Varies by Context

Potential Mitigations

Implementation

Remove unused variables from the code.

Applicable Platforms

Not Language-Specific

Security Training

Train your team to recognize and prevent security threats with our comprehensive security awareness program.

Start Training

Vulnerability Scanning

Discover vulnerabilities in your applications and infrastructure before attackers do.

Scan Now