Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328805

Summary: [Workbench] Some Tests with unused local variables
Product: [Eclipse Project] Platform Reporter: Hitesh <hsoliwal>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED FIXED QA Contact: Hitesh <hsoliwal>
Severity: normal    
Priority: P3    
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch V01 none

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.