Xcode编译标志来抑制可空性警告不起作用? [英] Xcode Compile Flag to Suppress Nullability Warnings not Working?

查看:217
本文介绍了Xcode编译标志来抑制可空性警告不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在有限的时间内,我想抑制编译器在Xcode 7.3.1中向我显示的这些警告:

For a limited time I want to suppress these kind of warnings the compiler is showing me in Xcode 7.3.1:

<File>: Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)

我已将此编译器标志添加到我的目标/构建阶段/编译源"下的所有类中: -Wnullability-completeness

I have added this compiler flag to all classes under My Target/Build Phases/Compile Sources: -Wnullability-completeness

但是它不起作用-警告仍然显示.如何摆脱警告?

But it's not working - the warnings are still shown. How can I get rid of the warnings?

推荐答案

禁用这些警告,您需要:-Wno-nullability-completeness.注意no-;您正在使用的标志启用这些警告.

To disable those warnings, you want: -Wno-nullability-completeness. Note the no-; the flag you're using enables those warnings.

这篇关于Xcode编译标志来抑制可空性警告不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆