One of my view controllers relies on several classes that each have an initWithDelegate: method. The view controller is the delegate in all cases. I get compiler warnings on all calls to
[[ONE_OF_FOUR_CLASSES] alloc] initWithDelegate:self];
except for the first (who's header file is loaded first).
All the others give an "incompatible pointer types assigning to xx from yy" warning. yy is always that first of the 4 classes.
Everything runs fine, however. So how do I suppress these warnings? Is this an LLVM bug?
Sounds as if the types doesn't match or are not known to the compiler. Don't forget to add the signatures of your init
-methods to your .h files and import them. Check that they return an id
and that delegate
is of type id
as well (at least that's what you want most of the time).
Feel free to edit your question to include more code if this doesn't clear things up.