Compiler Warning sometimes not showing
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.