• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: disable warning for override in category?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disable warning for override in category?


  • Subject: Re: disable warning for override in category?
  • From: Felix Franz <email@hidden>
  • Date: Thu, 16 Feb 2012 18:28:39 +0100

On 16.02.2012, at 17:12, Marc Respass wrote:

Hi All,

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.

have you tried using #pragma? http://clang.llvm.org/docs/UsersManual.html#diagnostics_pragmas

According to the documentation

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"

// do your override


 _______________________________________________
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

  • Follow-Ups:
    • Re: disable warning for override in category?
      • From: Marc Respass <email@hidden>
References: 
 >disable warning for override in category? (From: Marc Respass <email@hidden>)

  • Prev by Date: disable warning for override in category?
  • Next by Date: Re: disable warning for override in category?
  • Previous by thread: disable warning for override in category?
  • Next by thread: Re: disable warning for override in category?
  • Index(es):
    • Date
    • Thread