xcode - 在 GCC 中抑制 "does not implement protocol"警告

标签 xcode gcc warnings pragma

我想在 Xcode 中开发 iPhone 应用程序时抑制特定警告。警告是:

"warning: class 'XXX' does not implement the 'XYZ' protocol"

我知道我使用指令:
#pragma GCC diagnostic warning "-Wxxxxxxxxxxxx"

但我不知道 xxxxxxxxxxxx 应该是什么。有任何想法吗?

(假设:这样做是有正当理由的。我需要这样做,否则我无法启用将警告视为错误选项。)

最佳答案

如果问题只是您不能使用 -Werror然后使用 -Wno-protocol禁用该特定警告。并非所有警告都可以通过编译指示禁用。

关于xcode - 在 GCC 中抑制 "does not implement protocol"警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4140526/

相关文章:

c - ARM 设备上的 "undefined behaviour"

Android - 多级 Activity 链的问题

c++ - 如何忽略来自 3rd 方包的警告?

ios - 如何覆盖约束

swift - 自 SearchBar 实现以来 Xcode 9.4.1 TableView 问题

c++ - 为什么 GCC 和 Clang 不做这种别名优化?

php - 引用 - 这个错误在 PHP 中意味着什么?

iOS 应用程序更新版本 1.1

swift - 如何更改 NSPopUpButtonCell NSTableView Swift 4.2 中的 selectItem?

c - 不包括 stdlib.h 不会产生任何编译器错误!