ABSTRACT

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

EXPLANATION

This variable's initial value is not used. After initialization, the variable is either assigned another value or goes out of scope.

Example: The following code excerpt assigns to the variable r and then overwrites the value without using it.


int r = getNum();
r = getNewNum(buf);

REFERENCES

[1] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3050 CAT II

[2] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 398