CWE-561
Dead Code
AI Translation Available
The product contains dead code, which can never be executed.
Status
draft
Abstraction
base
Affected Platforms
Extended Description
AI Translation
Dead code is code that can never be executed in a running program. The surrounding code makes it impossible for a section of code to ever be executed.
Technical Details
AI Translation
Common Consequences
other
Impacts
quality degradation
reduce maintainability
Detection Methods
architecture or design review
automated static analysis - binary or bytecode
dynamic analysis with manual results interpretation
automated static analysis
automated static analysis - source code
dynamic analysis with automated results interpretation
manual static analysis - source code
Potential Mitigations
Phases:
implementation
testing
Descriptions:
•
Remove dead code before deploying the application.
•
Use a static analysis tool to spot dead code.