Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
441 views
in Technique[技术] by (71.8m points)

objective c - Is it possible to suppress Xcode 4 static analyzer warnings?

The Xcode 4 static analyzer reports in my code some false positives. Is there any way to suppress them?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...