Java


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

Summary

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.

Properties

Class Name Unused Value: Actual Parameter (Java)
Significance reliability
Mnemonic JAVA.STRUCT.UUVAL.ACTUAL
Categories
CWE CWE:563 Assignment to Variable without Use
Availability Available for Java only.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Unused Value: Actual Parameter (Java)"

Resolution

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

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.