• 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: Why is 'missing sentinel in function call' appearing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is 'missing sentinel in function call' appearing?


  • Subject: Re: Why is 'missing sentinel in function call' appearing?
  • From: David Duncan <email@hidden>
  • Date: Thu, 14 Oct 2010 13:32:30 -0700

On Oct 14, 2010, at 1:30 PM, David Duncan wrote:

> On Oct 14, 2010, at 1:25 PM, Tito Ciuro wrote:
>
>>   return [[[self alloc]initWithObjects:someObjects]autorelease]; <<<<<<<<<<<< warning occurs here
>
>
> -initWithObjects expects a list with a nil terminator, which you have not provided. If this "works" it is because you are getting very lucky with what is already on the stack.


Sorry, read a bit too fast. The problem is likely that [self alloc] returns 'id' so the compiler doesn't know which -initWithObjects: you mean, so it arbitrarily picks the NSArray version, which then flags the error. You could not be seeing this on other compilers due to the "arbitrary" part, but overall you should probably name your -initWithObjects: method something else.
--
David Duncan

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Why is 'missing sentinel in function call' appearing?
      • From: Tito Ciuro <email@hidden>
References: 
 >Why is 'missing sentinel in function call' appearing? (From: Tito Ciuro <email@hidden>)
 >Re: Why is 'missing sentinel in function call' appearing? (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Why is 'missing sentinel in function call' appearing?
  • Next by Date: Re: Why is 'missing sentinel in function call' appearing?
  • Previous by thread: Re: Why is 'missing sentinel in function call' appearing?
  • Next by thread: Re: Why is 'missing sentinel in function call' appearing?
  • Index(es):
    • Date
    • Thread