Foo *oFoo = [[[Foo alloc] init] autorelease];
This is how I was taught to program in Objective C, yet the CLang error checker complains that the initial value was never read. But oFoo is an object with properties. oFoo itself has no single value. The property values are what matter.
oFoo.PropertyA = 1;
oFoo.PropertyB = @"Hello, World."
Should I just ignore this? Is this worth fixing? What is the fix, seeing that "initial value" is meaningless in my context?
Usually that means:
For a simple type:
int a;
a = 2;
a = 3;
First value (2) is never used. Similar things can happen with objects, for example:
Foo *oFoo = [[[Foo alloc] init] autorelease];
oFoo.PropertyA = 1;
oFoo.PropertyB = @"Hello, World."
oFoo = [[[Foo alloc] init] autorelease];
Here first alloc-init block created a value that was overridden by second alloc-init. And error tells something like that.
Instead of second alloc-init block I can close method implementation, that will be similar.