I have a property, noteName, declared as follows:
@property (nonatomic,assign) IVNoteName noteName;
and defined as follows:
@synthesize noteName;
but when I attempt to use it, the static analyzer behaves strangely.
NSInteger noteNameOffsets[8] = {0,2,3,5,7,8,10};
midiValue += noteNameOffsets[[self noteName]]; //On this line,
//the analyzer tells me "The right operand to '+=' is always 0"
I have logged the value of [self noteName]
in that method call, finding many sensible, non-zero values. Furthermore, the method this code is from works as intended.
This is no longer an issue in Xcode 4.2.