[Infer] Fix Infer errors/warnings (#1938)

* [Infer] Fix 11 Infer errors/warnings

* fix build error
This commit is contained in:
Hannah Troisi
2016-07-16 15:29:24 -07:00
committed by appleguy
parent abf8d5b9aa
commit 4baf9bdbfe
10 changed files with 54 additions and 24 deletions

View File

@@ -59,13 +59,15 @@ static void runLoopSourceCallback(void *info) {
// It is not guaranteed that the runloop will turn if it has no scheduled work, and this causes processing of
// the queue to stop. Attaching a custom loop source to the run loop and signal it if new work needs to be done
CFRunLoopSourceContext *runLoopSourceContext = (CFRunLoopSourceContext *)calloc(1, sizeof(CFRunLoopSourceContext));
runLoopSourceContext->perform = runLoopSourceCallback;
if (runLoopSourceContext) {
runLoopSourceContext->perform = runLoopSourceCallback;
#if ASRunLoopQueueLoggingEnabled
runLoopSourceContext->info = (__bridge void *)self;
runLoopSourceContext->info = (__bridge void *)self;
#endif
_runLoopSource = CFRunLoopSourceCreate(NULL, 0, runLoopSourceContext);
CFRunLoopAddSource(runloop, _runLoopSource, kCFRunLoopCommonModes);
free(runLoopSourceContext);
_runLoopSource = CFRunLoopSourceCreate(NULL, 0, runLoopSourceContext);
CFRunLoopAddSource(runloop, _runLoopSource, kCFRunLoopCommonModes);
free(runLoopSourceContext);
}
#if ASRunLoopQueueLoggingEnabled
_runloopQueueLoggingTimer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(checkRunLoop) userInfo:nil repeats:YES];