Re: Compiler Warning sometimes not showing
Re: Compiler Warning sometimes not showing
- Subject: Re: Compiler Warning sometimes not showing
- From: Heath Raftery <email@hidden>
- Date: Thu, 02 Sep 2004 08:38:21 +1000
John,
Only thing I can think of at this stage is that the file is already
compiled. Can you confirm that you still see this behaviour after a
Clean of the project, making sure the file is compiled?
Oh, another thing - XCode has dead code stripping. Is that function
actually used?
Heath
On 02/09/2004, at 4:24 AM, John Tsombakos wrote:
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.