Bug 12933 - "Never used" variable warnings can't detect across scope
Summary: "Never used" variable warnings can't detect across scope
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-05 20:01 EST by Riyad Kalla CLA
Modified: 2002-04-23 08:49 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 Riyad Kalla CLA 2002-04-05 20:01:00 EST
Example of code snippet:

int lastY = getPadding().top;
Label item = null;
		
for( int i = 0; i < listItems.size(); i++ )
{
     item = (Label)listItems.get( i );
}

I have "warning" turned on for variables that are unused, and eclipse 
reports "item" as an unused variable.

I'm using:

Windows XP
Eclipse March 22nd stable release
JDK 1.4
Comment 1 Philipe Mulet CLA 2002-04-08 07:02:32 EDT
The error message was changed a while ago to read : 
  "The local variable item is never read"

which is more intuitive.
Closing.