如何禁用XCode中标记为错误的警告 [英] How do I disable warnings being flagged as errors in XCode

查看:81
本文介绍了如何禁用XCode中标记为错误的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在XCode设置,可让您将警告不视为XCode中的错误?我正在做很多原型代码,在这里我不在乎是否有未使用的变量. XCode将这些警告视为错误,这严重降低了我的工作效率.虽然不知道如何禁用它.

Is there a setting XCode that lets you treat warnings NOT as errors in XCode? I'm doing alot of prototyping code where I don't care if I have an unused variable for example. XCode is treating these warnings as errors and it is seriously slowing down my productivity. Can't figure out how to disable this though.

推荐答案

如果在XCode中打开项目,请在Targets文件夹中右键单击目标.从下拉菜单中选择获取信息",然后向下滚动到有关编译器警告的部分(我的包装箱中的GCC 4.0警告).在这里,您可以禁用已激活的各种警告的复选框.还要检查其他警告标志"的值.这可能包括-Wall或-WMost,它们将启用其他警告.您可以删除它,希望您的警告不会出现.

If you open your project in XCode, then right click on your target in the Targets folder. Select "Get Info" form the drop down menu and then scroll down to the section for the compiler warnings (GCC 4.0 Warnings on my box). Here you can disable the checkboxes for the various warnings you have active. Also check the value of "Other Warning Flags". This could include -Wall or -WMost which will enable other warnings. You can remove that and hopefully your warnings will not appear.

祝你好运!

这篇关于如何禁用XCode中标记为错误的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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