• 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
Compiler Warning sometimes not showing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiler Warning sometimes not showing


  • Subject: Compiler Warning sometimes not showing
  • From: John Tsombakos <email@hidden>
  • Date: Wed, 1 Sep 2004 14:24:13 -0400

An issue came up with a app that I'm working on, where the app would crash as it was starting up. Turned out to be a missing 'return' statement in a method. The problem is, the compiler never gave a warning. In a similar project where this code was (incorrectly) copied, I removed the return statement and when it was compiled, I get a "control reaches end of non-void function" warning.

The method is defined as:

- (NSArray *)categories
{
  // removing the "return" does not give a warning in one
  // project, but does give a warning in another

    return [Categories allCategories];
}

I compared the build settings of the two projects and they are the same, as far as the Warnings section is concerned - even though there isn't anything I can see that deals with that warning anyway.

Any idea why I would get the warning in one project and not in another? What setting would cause the warning to not show?

Also, the project that the warning does NOT show on, was created from a standard Cocoa Document based application template. The other app is some sample code from mmalcolm crawford.

Thanks

John.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Compiler Warning sometimes not showing
      • From: Heath Raftery <email@hidden>
  • Prev by Date: Re: Trouble with unicode, I think
  • Next by Date: Helpful Xcode Hint
  • Previous by thread: Re: Trouble with unicode, I think
  • Next by thread: Re: Compiler Warning sometimes not showing
  • Index(es):
    • Date
    • Thread