• 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: Strange Analyser Warning/Error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Analyser Warning/Error


  • Subject: Re: Strange Analyser Warning/Error
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 08 Feb 2016 08:28:17 -0800

> On Feb 8, 2016, at 8:09 AM, Steve Sisak <email@hidden> wrote:
>
> The nil key pointer is a red herring. -[NSDictionary objectForKey:] can return nil if the dictionary doesn’t contain a value for the key.
>
> The analyser is correctly flagging that the code doesn’t handle this case.

No, it isn’t, because that case doesn’t occur here. The value returned from -objectForKey (myUserInfo) is never used as a method parameter in that code snippet. I think you’re mixing it up with theUserInfo.

I’ve been getting an increasing number of apparently nonsensical analyzer warnings (mostly in C++ code) in the past year or so (since Xcode 6?). They tend to be very complex, with up to a dozen steps going through multiple functions, but end up warning about something useless or impossible.

Anyway, analyzer issues should be discussed on xcode-users…

—Jens
_______________________________________________

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: 
 >Strange Analyser Warning/Error (From: Dave <email@hidden>)
 >Re: Strange Analyser Warning/Error (From: Michael Babin <email@hidden>)
 >Re: Strange Analyser Warning/Error (From: Dave <email@hidden>)
 >Re: Strange Analyser Warning/Error (From: Ken Thomases <email@hidden>)
 >Re: Strange Analyser Warning/Error (From: Steve Sisak <email@hidden>)

  • Prev by Date: Re: Strange Analyser Warning/Error
  • Next by Date: CoreImage filters spam the log on El-Capitan?
  • Previous by thread: Re: Strange Analyser Warning/Error
  • Next by thread: Re: Strange Analyser Warning/Error
  • Index(es):
    • Date
    • Thread