Re: Disabling some compiler warnings
Re: Disabling some compiler warnings
- Subject: Re: Disabling some compiler warnings
- From: "John C. Randolph" <email@hidden>
- Date: Sun, 15 Jul 2001 12:56:09 -0700
On Sunday, July 15, 2001, at 10:58 AM, email@hidden wrote:
Is there a way to disable some unuseful warnings of the compiler? For
instance, I have a class with:
IBOutlet id delegate;
and then in implementation:
[delegate someAction];
The compiler says:
Warning: cannot find method
Warning: return type for 'someAction' defaults to id
Well how would it be possible to find a method for an 'id', anyway? If
I declare the object as id, I already know that the compiler cannot
check at runtime, so it is just noise. Moreover, I don't mind the
return type, since I don't use it (the method is called as a procedure;
actually it's a void one in my case). this is something that the
compiler could check before issuing the warning!
Thanks for any suggestion.
The compiler *can't* check this, and that's why it's issuing the warning.
The compiler's complaining because it hasn't seen any declaration of
-someAction before you use it. Just #import whatever header declares
the method, and the warning will go away.
-jcr
"Scientology is both immoral and socially obnoxious... it is
corrupt, sinister and dangerous." - Mr. Justice Latey, London 1984