Re: Analyzer warning about garbage with double return values
Re: Analyzer warning about garbage with double return values
- Subject: Re: Analyzer warning about garbage with double return values
- From: Markus Spoettl <email@hidden>
- Date: Wed, 2 Sep 2009 10:55:03 +0200
On Sep 2, 2009, at 10:45 AM, Jonas Maebe wrote:
I thought it was safe to message nil-objects, the return value
would be 0 or the equivalent for the respective expression return
type. Is this not the case for double return values?
See http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocObjectsClasses.html#//apple_ref/doc/uid/TP30001163-CH11-SW7
, in particular the last bullet in that list.
From the docs:
"If the method returns any pointer type, any integer scalar of size
less than or equal to sizeof(void*), a float, a double, a long double,
or a long long, then a message sent to nilreturns 0."
Which is exactly what I was thinking, hence the confusion about the
analyzer warning. Does this mean it's an analyzer bug? Is this known?
Regards
Markus
--
__________________________________________
Markus Spoettl
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden