I am trying to make a source code which I can check by Clang Static Analyzer.
I am fully newbie in Obj C so I don't know how can I use these small code parts.
Here is the checkers list: http://clang-analyzer.llvm.org/available_checks.html#osx_checkers
osx.cocoa.AtSync (ObjC):
void test(id x) {
if (!x)
@synchronized(x) {} // warn: nil value used as mutex
}
I just need a 5-10 lines of code which I can test. I don't want to someone make codes for all checker, I just need an example for one.
Thanks!