|
|
|
|
| Weakness ID: 563 (Weakness Variant) | | Status: Draft |
Description
Description Summary The variable's value is assigned but never used, making it a
dead store.
Extended Description
It is likely that the variable is simply vestigial, but it is also
possible that the unused variable points out a bug.
Time of Introduction Demonstrative Examples Example 1 The following code excerpt assigns to the variable r and then
overwrites the value without using it. (Bad Code) C r = getName(); r = getNewBuffer(buf); Potential Mitigations | Phase | Description |
| Remove unused variables from the code. |
Other Notes
|
This variable's value is not used. After the assignment, the variable is
either assigned another value or goes out of scope.
|
Relationships Taxonomy Mappings | Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
| Anonymous Tool Vendor (under NDA) | | | |
| CERT C Secure Coding | MSC00-C | | Compile cleanly at high warning levels |
Content History | Submissions |
|---|
| Submission Date | Submitter | Organization | Source |
|---|
| Anonymous Tool Vendor (under NDA) | | Externally Mined | | | Modifications |
|---|
| Modification Date | Modifier | Organization | Source |
|---|
| 2008-07-01 | Eric Dalci | Cigital | External | | updated Potential Mitigations,
Time of Introduction | | 2008-09-08 | CWE Content Team | MITRE | Internal | | updated Description, Relationships, Other Notes,
Taxonomy Mappings | | 2008-11-24 | CWE Content Team | MITRE | Internal | | updated Relationships,
Taxonomy Mappings | | 2009-05-27 | CWE Content Team | MITRE | Internal | | updated Demonstrative Examples |
|