> On Feb 8, 2016, at 8:09 AM, Steve Sisak <sgs-li...@codewell.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to