<dd id="sga4y"><optgroup id="sga4y"></optgroup></dd>
<nav id="sga4y"><code id="sga4y"></code></nav>
  • <optgroup id="sga4y"></optgroup>

    Poor Style: Value Never Read

    ABSTRACT

    變量賦值后并不使用,而變成了一個死存儲。

    EXPLANATION

    沒有使用該變量的值。賦值之后,變量或者被重新賦值,或者超出范圍之外。

    例:以下摘錄的代碼為變量 r 賦值,并在沒有使用所賦數值的情況下,對其加以重寫。


    r = getName();
    r = getNewBuffer(buf);

    REFERENCES

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

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

    [3] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 563


    Copyright 2013 Fortify Software - All rights reserved.
    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
    desc.structural.java.poor_style_value_never_read

    97av