Re: Strange Analyser Warning/Error

2016-02-08 Thread Jens Alfke
> On Feb 8, 2016, at 8:09 AM, Steve Sisak 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

Re: Strange Analyser Warning/Error

2016-02-08 Thread Steve Sisak
On Feb 8, 2016, at 10:01 AM, Ken Thomases wrote: >>> >>> In the case where you do not see a warning, you are calling -[NSDictionary >>> objectForKey:] which accepts a nil key value (returning nil). >> >> Ah, for some reason I thought that is was illegal to pass a nil key to >> objectForkey

Re: Strange Analyser Warning/Error

2016-02-08 Thread Ken Thomases
On Feb 8, 2016, at 8:31 AM, Dave wrote: > >> >> In the case where you do not see a warning, you are calling -[NSDictionary >> objectForKey:] which accepts a nil key value (returning nil). > > Ah, for some reason I thought that is was illegal to pass a nil key to > objectForkey: It is ill

Re: Strange Analyser Warning/Error

2016-02-08 Thread Ken Thomases
On Feb 8, 2016, at 7:15 AM, Dave wrote: > > myUserInfo = [self.pUserIDDict objectForKey: theUserInfo.pUserID]; > if (myUserInfo != nil) > { > LTWAssertAlways(@"myUserInfo - Dupe ID!!"); > } > > if (theUserInfo.pUserID != nil)

Re: Strange Analyser Warning/Error

2016-02-08 Thread Dave
> > In the case where you do not see a warning, you are calling -[NSDictionary > objectForKey:] which accepts a nil key value (returning nil). Ah, for some reason I thought that is was illegal to pass a nil key to objectForkey: Thanks Dave ___

Re: Strange Analyser Warning/Error

2016-02-08 Thread Michael Babin
> On Feb 8, 2016, at 7:15 AM, Dave wrote: > > Look at this code: > > myUserInfo = [self.pUserIDDict objectForKey: theUserInfo.pUserID]; > if (myUserInfo != nil) > { > LTWAssertAlways(@"myUserInfo - Dupe ID!!"); > } > > if (theUserInfo.pUserID != nil)

Strange Analyser Warning/Error

2016-02-08 Thread Dave
Hi, Look at this code: myUserInfo = [self.pUserIDDict objectForKey: theUserInfo.pUserID]; if (myUserInfo != nil) { LTWAssertAlways(@"myUserInfo - Dupe ID!!"); } if (theUserInfo.pUserID != nil)