xcode 7 Objective c 警告 - 将 Null 传递给需要非空参数的被调用方
xcode 7 Objective c Warning - Null passed to a callee that requires a non-null argument
更新 XCODE 7 后,我收到此警告,我试图摆脱它,但找不到合适的解决方案:
CFRelease(CFNetworkCopyProxiesForURL((CFURLRef)theURL, NULL));
警告是:
Null passed to a callee that requires a non-null argument
找到了一个 hack 来摆脱这个警告
NSDictionary *proxySettings = NSMakeCollectable([(NSDictionary *)CFNetworkCopySystemProxySettings() autorelease]);
CFRelease(CFNetworkCopyProxiesForURL((CFURLRef)theURL, (CFDictionaryRef)proxySettings));
更新 XCODE 7 后,我收到此警告,我试图摆脱它,但找不到合适的解决方案:
CFRelease(CFNetworkCopyProxiesForURL((CFURLRef)theURL, NULL));
警告是:
Null passed to a callee that requires a non-null argument
找到了一个 hack 来摆脱这个警告
NSDictionary *proxySettings = NSMakeCollectable([(NSDictionary *)CFNetworkCopySystemProxySettings() autorelease]);
CFRelease(CFNetworkCopyProxiesForURL((CFURLRef)theURL, (CFDictionaryRef)proxySettings));