Bug 11011 - incorrect 'variable never used' warning
Summary: incorrect 'variable never used' warning
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-08 05:10 EST by Adam Kiezun CLA
Modified: 2002-03-13 11:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-03-08 05:10:47 EST
public class A {
	void f(boolean flag){
		boolean a;  //<<<incorrect 'variable never used' warning
		if (flag)
			a= true;
		else
			a= false;	
	}
}
Comment 1 Olivier Thomann CLA 2002-03-08 09:52:08 EST
I think 'never used' means that the value of this variable is never used. In your  example, you store 
a value in 'a', but you never read the value from 'a'. Then this variable is useless.
Comment 2 Adam Kiezun CLA 2002-03-08 10:01:31 EST
it's only a wording problem then.
would 'variable never read' be better?

for me, 'used' means 'read or assigned to'
Comment 3 Philipe Mulet CLA 2002-03-08 10:58:07 EST
It is a wording problem. 
Comment 4 Philipe Mulet CLA 2002-03-11 05:33:23 EST
Fixed error message wording.