是否可以抑制Xcode 4静态分析器警告? [英] Is it possible to suppress Xcode 4 static analyzer warnings?
本文介绍了是否可以抑制Xcode 4静态分析器警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Xcode 4静态分析器在我的代码中报告一些假阳性。有没有办法压制它们?
The Xcode 4 static analyzer reports in my code some false positives. Is there any way to suppress them?
推荐答案
我发现一个解决方案:假阳性(像苹果单身设计模式)避免使用:
I found a solution: false positives (like the Apple singleton design pattern) can be avoided with:
#ifndef __clang_analyzer__
// Code not to be analyzed
#endif
分析器不会分析这些预处理器指令之间的代码。
Analyzer will not analyze the code between those preprocessor directives.
这篇关于是否可以抑制Xcode 4静态分析器警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文