• 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: How do I get the compiler to warn me if I forget to return self?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get the compiler to warn me if I forget to return self?


  • Subject: Re: How do I get the compiler to warn me if I forget to return self?
  • From: Issac Trotts <email@hidden>
  • Date: Sat, 30 Oct 2004 22:26:22 -0700


On Oct 30, 2004, at 3:46 PM, M. Uli Kusterer wrote:

At 17:56 Uhr -0700 29.10.2004, Issac Trotts wrote:
It should be an error, but I don't even get a warning when I forget to return self in an initializer. For example:

- (id)init
{
[super init];
/* Initialize member variables. */
/* Oops, I forgot to return self! */
}

For me, GCC automatically warns me if a function that has a return type doesn't call "return" in one of its execution branches. Maybe you'll just have to turn that warning you turned off in xCode back on. There are flags for each warning, so at worst you could just add the appropriate -Wsomething flag to the additional compiler flags of your project.

OK, I will try it. Thanks for your help!

Issac

-----
Issac Trotts
Programmer, NIMH Human Brain Project
University of California, Davis
http://mallorn.ucdavis.edu/conexus

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >How do I get the compiler to warn me if I forget to return self? (From: Issac Trotts <email@hidden>)
 >Re: How do I get the compiler to warn me if I forget to return self? (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: How to add help tool tips for toolbar buttons?
  • Next by Date: Re: nextKeyView and NSTabView: How to prevent the tabbing order from going out of the tab view?
  • Previous by thread: Re: How do I get the compiler to warn me if I forget to return self?
  • Next by thread: Shark - Try it!
  • Index(es):
    • Date
    • Thread