Bug 64948 - Local variable is never used - warning
Summary: Local variable is never used - warning
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-01 10:03 EDT by Mirko Novakovic CLA
Modified: 2004-06-01 11:31 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirko Novakovic CLA 2004-06-01 10:03:16 EDT
Using the following code, I get an "Local vaiable is never used" warning.

String zeile = null;
while ((zeile = copystrecke.readLine()) != null) {
         ...
}

It seems that the assignment in the while statement is not evaluated for this 
warning.

- Mirko -
Comment 1 Olivier Thomann CLA 2004-06-01 11:02:22 EDT
Are you using the variable zeile in the while block?
Comment 2 Philipe Mulet CLA 2004-06-01 11:31:03 EDT
The warning says: "Local variable is never *read*". An assignment is only a 
write access.