• 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: "Sean McBride" <email@hidden>
  • Date: Thu, 14 Oct 2010 21:06:45 -0700
  • Organization: Rogue Research Inc.

On Thu, 14 Oct 2010 13:50:42 -0700, Greg Parker said:

>`[self alloc]` returns `id`, so the compiler has to guess which method
>prototype to use, yours or NSArray's. If it guesses wrong, you'll get
>that warning. Sometimes you'll get crashes or incorrect parameter values
>when the compiler guesses wrong, but in this case the generated code
>happens to work correctly.
>
>I'd recommend changing your method name. -initWithArray: would work,
>matching -[NSArray initWithArray:(NSArray*)array].

There's also the '-Wstrict-selector-match' warning:

"Warn if multiple methods with differing argument and/or return types
are found for a given selector when attempting to send a message using
this selector to a receiver of type "id" or "Class".  When this setting
is disabled, the compiler will omit such warnings if any differences
found are confined to types which share the same size and alignment.
[GCC_WARN_STRICT_SELECTOR_MATCH, -Wstrict-selector-match]"

Alas, the warning is not so useful in practice because Apple's headers
trigger hundreds of such warnings.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

References: 
 >Why is 'missing sentinel in function call' appearing? (From: Tito Ciuro <email@hidden>)
 >Re: Why is 'missing sentinel in function call' appearing? (From: Greg Parker <email@hidden>)

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