Re: multiple declarations...
Re: multiple declarations...
- Subject: Re: multiple declarations...
- From: Ondra Cada <email@hidden>
- Date: Wed, 5 Jun 2002 00:41:34 +0200
On Tuesday, June 4, 2002, at 11:58 , email@hidden wrote:
what strategy do people use to quiet down compiler warnings about
multiple declarations in cases like this:
// get the key named context out of the two objects a and b and compare
them.
int compare(id a, id b, void *context) {
id va = [a valueForKey:(id)context];
id vb = [b valueForKey:(id)context];
return [va compare:vb]; // this line produces the warning...
}
I know that the value's in va and vb are either strings, numbers, or
dates...
Never mind that, just cast to any of them, like (NSString*).
The problem is a slight a non-fatal design flaw in OpenStep: there should
have been -compare:(id), and a number of -compareWithString:(NSString*)
and alike.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.