Re: pragma nowarn
Re: pragma nowarn
- Subject: Re: pragma nowarn
- From: "Alexander v. Below" <email@hidden>
- Date: Wed, 12 Dec 2007 14:03:46 +0100
On 12.12.2007, at 13:47, Alastair Houghton wrote: I have yet to see a situation where there is genuinely a reason for not changing the code to fix a warning, assuming that you don't enable any of the sillier warning flags.
Especially when you want to dynamically call methods from different SDKs, getting rid of the warnings can be a challenge. Example:
Take this code, which is compiled against the 10.2 SDK (but the issue is the same for any cross-SDK development):
if (floor(NSAppKitVersionNumber) > 663) // NSAppKitVersionNumber10_2 [center postNotificationName:myNotification object:nil userInfo:info options:(1 << 1)]; else [center postNotificationName:myNotification object:nil userInfo:info];
This will produce the following warning:
warning: `NSDistributedNotificationCenter' may not respond to `-postNotificationName:object:userInfo:options:' warning: cannot find method `-postNotificationName:object:userInfo:options:'; return type `id' assumed
For someone who likes his code warning free, I have found no way of getting rid of this warning. And I DO NOT want to turn off the "cannot find method" warning
Alex
|
_______________________________________________
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