Xcode 4静态分析器在我的代码中报告了一些误报.有没有办法压制他们?

推荐答案

我找到了一个解决方案:可以通过以下方法避免误报(如Apple singleton设计模式):

#ifndef __clang_analyzer__

// Code not to be analyzed

#endif

Analyzer不会分析这些预处理器指令之间的代码.

Objective-c相关问答推荐

将 NSInteger 转换为 NSIndexpath

UIAlertController:supportedInterfaceOrientations 被递归调用

iphone 的 UIPopoverController 不工作?

如何向 UILabel 添加滚动功能

pathForResource 返回 null

NSInternalInconsistencyException: '无效参数不满足: !stayUp || CLClientIsBackgroundable(内部->fClient)'

如何在 iOS SDK 中使用语音识别?

dispatch_get_global_queue vs dispatch_get_main_queue

判断 NSString 是否只是由空格组成

Objective-C 中的 alloc、init 和 new

Objective-C:前向类声明

NSMutableArray 按顺序添加对象

NSHTTPCookieStorage 状态未在应用退出时保存.那里有任何明确的知识/文档吗?

如何判断数组是空还是空?

Objective-c 2.0 中的可选参数?

分组的 UITableView 在底部有 20px 的额外填充

Xcode 的不完整实现警告

将参数传递给由 NSTimer 调用的方法

Facebook SDK 登录永远不会在 iOS 9 上回调我的应用程序

UICollectionView:如何检测滚动何时停止