Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.)

like image 345
Scott McKenzie Avatar asked Nov 10 '10 01:11

Scott McKenzie


1 Answers

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.

like image 142
Jonathan Wakely Avatar answered Oct 16 '22 13:10

Jonathan Wakely