Reporter | Judson Maag (Judson.Maag) |
---|---|
Created | Feb 1, 2012 3:20:05 AM |
Updated | Mar 25, 2012 8:42:26 PM |
Priority | Normal |
Type | Bug |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Evgeny Pasynkov (pasynkov) |
Subsystem | Code Analysis |
Affected versions | 6.1 |
Fixed in build | No Fixed in build |
This code gives a warning to remove the redundant initializer when in DEBUG. However, this is not an issue when in RELEASE. In fact, the object would never be initialized if the 'redundant' initializer were to be removed.
var myvar = SomeClass.SomeStaticMethod("someParameterValue");
#if DEBUG
var myvar = SomeClass.SomeStaticMethod("someOtherParameterValue");
#endif
var myvar = SomeClass.SomeStaticMethod("someParameterValue");
#if DEBUG
var myvar = SomeClass.SomeStaticMethod("someOtherParameterValue");
#endif