Closed iccir closed 8 years ago
The following code gives a "Unused instance variable" warning. The instance variable is used, but it's never assigned and hence will always be nil.
Perhaps instead the warning should be "Instance variable _bar never assigned".
@implementation Foo { id _bar; } - (void) doSomethingWithBar { [_bar doSomething]; } @end
The above will now give a "Used but never assigned" warning.
The following code gives a "Unused instance variable" warning. The instance variable is used, but it's never assigned and hence will always be nil.
Perhaps instead the warning should be "Instance variable _bar never assigned".