Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328805 - [Workbench] Some Tests with unused local variables
Summary: [Workbench] Some Tests with unused local variables
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Hitesh CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 06:02 EDT by Hitesh CLA
Modified: 2010-11-10 12:48 EST (History)
0 users

See Also:


Attachments
Patch V01 (4.19 KB, text/plain)
2010-10-27 06:02 EDT, Hitesh CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hitesh CLA 2010-10-27 06:02:08 EDT
Created attachment 181814 [details]
Patch V01

http://dev.eclipse.org/mhonarc/lists/platform-releng-dev/msg17570.html

Before doing the build submission, I am expanding the shorthand operators so that these are not marked as errors. Please look into the tests as indicated by the attached patch.

Build Id: I20101025-1800
Comment 1 Paul Webster CLA 2010-10-27 07:45:09 EDT
Why are the short-hand operators marked as errors now?  I thought this was just about unused locals?

PW
Comment 2 Paul Webster CLA 2010-10-27 07:51:56 EDT
Ah, it's just now catching write-only operations.  I'd just delete the variable, since it's still not doing anything, and open another bug to actually write up the test methods for those 2 classes :-)

PW
Comment 3 Hitesh CLA 2010-10-27 08:25:19 EDT
(In reply to comment #2)
> Ah, it's just now catching write-only operations.  I'd just delete the
> variable, since it's still not doing anything, and open another bug to actually
> write up the test methods for those 2 classes :-)
> 
> PW

Yes it is still about unused locals. The point to be noted is that 'a++' is not taken to read the local variable 'a'. While in case of 'a = a + 1', variable 'a' is taken to be read before incrementing. 

The set of changes in the patch was never reported as errors in my workspace before. There has obviously been some change, and it marks them as errors now. Nonetheless they are unused variables, and regardless of the changes indicated , they do call for attention. I could have done away completely with them, but the question I had was how did they suddenly become unused.
Comment 4 Paul Webster CLA 2010-11-09 08:17:30 EST
(In reply to comment #3)
> The set of changes in the patch was never reported as errors in my workspace
> before. There has obviously been some change, and it marks them as errors now.
> Nonetheless they are unused variables, and regardless of the changes indicated
> , they do call for attention. I could have done away completely with them, but
> the question I had was how did they suddenly become unused.

Was this patch checked in?  If so, could you mark this as fixed and open a new bug about actually fixing the tests in question (as they are bogus at the moment)?

PW
Comment 5 Hitesh CLA 2010-11-10 12:48:57 EST
(In reply to comment #4)

A new bug to investigate those testcases sounds good to me too. Thanks.

Marking as fixed.