Suppress "does not implement protocol" warning in GCC
I want to suppress a particular warning while developing an iPhone app in Xcode. The warning is:
"warning: class 'XXX' does not implement the 'XYZ' protocol"
I understand I use the directive:
#pragma GCC diagnostic warning "-Wxxxxxxxxxxxx"
But I don't know what the xxxxxxxxxxxx should be. Any ideas?
(Assumption: there is a valid reason for doing this. And I need to do this because otherwise I can't enable the treat warnings as errors option开发者_运维知识库.)
If the problem is just that you can't use -Werror
then use -Wno-protocol
to disable that particular warning. Not all warnings can be disabled by pragmas.
Try this.
@interface XXX: UIViewController < XYZ>
{
}
精彩评论