Re: disable warning for override in category?
Re: disable warning for override in category?
- Subject: Re: disable warning for override in category?
- From: Marc Respass <email@hidden>
- Date: Thu, 16 Feb 2012 15:12:52 -0500
El feb 16, 2012, a las 1:15 p.m., David Duncan escribió: On Feb 16, 2012, at 8:12 AM, Marc Respass wrote: I need to override a method in a category. I know I'm not supposed to do it but and I don't except in one place which is legacy code and I need it to keep working. Yesterday, everything was working fine. This morning, I upgraded to Xcode 4.3 and now I'm getting more warnings (warnings == errors) including
category is implementing a method which will also be implemented by its primary class [-Werror,-Wobjc-protocol-method-implementation]
I cannot find anything on -Wobjc-protocol-method-implementation anywhere. What I am hoping to do is disable the warning on just that class but I don't know what the compiler flag is. I really do not want to turn off warnings == errors but that's what I have to do for now.
-Wobjc-protocol-method-implemetation /is/ the compiler flag your looking for. Or more specifically, -Wfoo turns on a warning, -Wnofoo turns it off. You can also use a #pragma to disable warnings in particular places (which is what I would probably do for this specific warning) but I don't recall the specific syntax – you should be able to find it on llvm.org in the docs for Clang.
Thanks David. I didn't know that either. I learned a lot today about stuff I never do and appreciate everyone's response.
Marc
|
_______________________________________________
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