Analyzer warning about garbage with double return values
Analyzer warning about garbage with double return values
- Subject: Analyzer warning about garbage with double return values
- From: Markus Spoettl <email@hidden>
- Date: Wed, 2 Sep 2009 10:07:54 +0200
Hello,
analyzer is a really really fantastic thing in Xcode 3.2, it's
really cool.
What I don't understand with code like this:
- (void)func:(NSString *)val
{
[...]
double d = [val doubleValue];
[...]
}
I get this Logic Error:
- The receiver in the message expression is 'nil' and results in the
returned value (of type 'double' and of size 8 bytes) to be garbage or
otherwise undefined
1. Assuming pointer value is null
2. The receiver in the message expression is 'nil' and results in the
returned value (of type 'double' and of size 8 bytes) to be garbage or
otherwise undefined
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?
I'm using Xcode 3.2 on 10.6 with the (32bit) project set to use the
10.5 base SDK.
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