On 14. Mrz 2006, at 01:53 Uhr, Mike Stump wrote:
Am I the only one who gets those:
DOMElement.m:283: warning: pointer type mismatch in conditional
expression
I doubt it.
;-)
For stuff like:
objs[1] = _ns ? _ns : (id)null;
or
return [pathes isNotNull] ? pathes : nil;
And here all information that I can use to answer the question has
been stripped.
I assume you refer to the types of the variables. Why would they
matter in the two given cases? Both "(id)null" and "nil" are of type
'id' which in turn should not conflict with any other typed ObjC
reference?
You can find the full source of the file at:
http://svn.opengroupware.org/SOPE/trunk/sope-xml/DOM/DOMElement.m
The relevant section for the first error:
"DOMElement.m:283: warning: pointer type mismatch in conditional
expression"
should be:
---snip---
...
static NSNull *null = nil;
...
- (BOOL)hasAttribute:(NSString *)_localName namespaceURI:(NSString *)
_ns {
id objs[2];
...
objs[1] = _ns ? _ns : (id)null;
...
}
---snap---
Thanks a lot,
Helge
--
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org