[cfe-dev] False positive warning: "warning: 'terminate:' is deprecated"?
Jean-Daniel Dupas
devlists at shadowlab.org
Tue Dec 13 14:37:49 PST 2011
Le 13 déc. 2011 à 22:07, Sean McBride a écrit :
> On Tue, 13 Dec 2011 12:20:43 -0800, Nico Weber said:
>
>> This breaks the chromium build with the 10.6 sdk. So the recommended
>> fix is to explicitly typecast NSApp everywhere it's used?
>
> Another solution is to not use the NSApp global (which is 'id'), but instead call [NSApplication sharedApplication] (which is 'NSApplication*').
Or simply define a macro (or an inline function) that perform this cast.
> I filed rdar://10566004 asking that NSApp be changed from 'id' to 'NSApplication*'.
Though it may look easy to fix, I would not rely on Apple to fix this soon. I'm waiting for more than 2 years that they add some missing availability macros in there SDKs (for instance, the whole ColorSync API introduced in 10.6). And this lack of 'weak' attribute is far more annoying as it causes crash at runtime and not simply a compiler warning.
-- Jean-Daniel
More information about the cfe-dev
mailing list