Re: error message
Re: error message
- Subject: Re: error message
- From: David Remahl <email@hidden>
- Date: Sun, 20 Oct 2002 03:03:23 +0200
It probably _is_ too late.
The error message says that the function (method in this case) reaches the
end, even though it is not a void function. The reason it 'reaches end' is
that it doesn't use the return keyword. With those clues, it is easy to spot
the mistake:
- (id)init
{
if( self = [super init] )
{
// blah
}
return self; // !!!***!!!
}
/ Rgds, David
>
It's probably just late, but I can't figure out why I'm getting:
>
>
AppController.m.18: warning: control reaches end of non-void function
>
>
with this code:
>
>
@implementation AppController
>
>
- (id)init
>
{
>
if (self = [super init])
>
(NSArray *)resultArray = [[NSArray alloc] init];
>
} // this line selected by warning system!
>
>
Anyone feeling generous tonight?
>
>
Brian
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >error message (From: "Brian E. Howard" <email@hidden>) |