Description:
This message is generated if the expression value is not used. For example, a variable is subsequently assigned two expressions. This message is also reported if the object produced by the new operator is not used, and the object creation operation has no side effects.
This message is not reported for variables initialized by the null literal even if this value is not used afterwards. This is considered a commonly used coding style.
Example:
void f() {
int i = 0;
for (i = 10; i >= 0; i--) {
...
}
ArrayList v = null; // no warning
v = new ArrayList();
...
}