I have recently (e.g. just now) upgraded to XCode 4, and I like it overall, however, there is one thing that annoys me.
When I write code like this:
if (self = [super init])
{
...
}
It gives me an ‘issue’: Using the result of an assignment as a condition without parentheses
How can I suppress this warning, as It underlines all the text in red, making me think that there is a critical error. As I am a somewhat seasoned Objective-C coder, I really don’t want to change my practices and add extra parentheses around my init statements.
You can either put an additional set of parentheses in the if statement
Or, you can do as the new templates do.