如何抑制或忽略 Xcode 中的所有警告?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33111048/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to suppress or ignore all warnings in Xcode?
提问by Joey Tawadrous
Does anyone know how to suppress all warnings in Xcode 7? I've tried pragmas and compiler flags... nothing works
有谁知道如何抑制 Xcode 7 中的所有警告?我试过编译指示和编译器标志......没有任何效果
采纳答案by Massimo Polimeni
First of all, it's a really bad idea: warnings exist for a reason, you really should check each of them.
首先,这是一个非常糟糕的主意:警告的存在是有原因的,您确实应该检查每个警告。
But... you want suppress every warning or just a few types there's a way, check these easy steps and turn off all or just what you need:
但是......你想抑制每一个警告或只有几种类型的方法,检查这些简单的步骤并关闭所有或只是你需要的:
1)search for "show warning" in your build settings
1)在构建设置中搜索“显示警告”
2)under build settingssearch for Apple LLVM 7.0 - Warnings - All languages
2)在构建设置下搜索Apple LLVM 7.0 - 警告 - 所有语言