gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 13:00:21 25 4
gpt4 key购买 nike

我想在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com