• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Disabling some compiler warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Disabling some compiler warnings (From: email@hidden)

  • Prev by Date: Re: Working with Strings
  • Next by Date: Currency Converter sample [rateField selectText:self]; doesn't work...?
  • Previous by thread: Disabling some compiler warnings
  • Next by thread: Re: Disabling some compiler warnings
  • Index(es):
    • Date
    • Thread