Java


JAVA.STRUCT.UUVAL.ACTUAL : Unused Value: Actual Parameter (Java)

要旨

A parameter is assigned before being read.

This checker finds assignments to local variables that are useless and could be consequently removed from code, hence obtaining a more efficient program. In some cases, these assignments hide actual bugs in the logic of the code.

プロパティ

クラス名 Unused Value: Actual Parameter (Java)
日本語クラス名 Unused Value: Actual Parameter (Java)
クラス分類 信頼性 (reliability)
ニーモニック JAVA.STRUCT.UUVAL.ACTUAL
カテゴリー
CWE CWE:563 Assignment to Variable without Use
対応言語 Java で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで有効になっています。チェックを無効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += discard class="Unused Value: Actual Parameter (Java)"

解決法

Remove the assignment and check if it actually hid a more serious algorithmic issue.

関連のある設定ファイルパラメータ

設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。