REVIEW: fix possible -Wdeprecated-declarations warnings

This commit is contained in:
deepak1556 2019-02-04 22:37:51 +05:30
parent 2ccf5904e0
commit d7fea1b484
4 changed files with 22 additions and 20 deletions

View file

@ -141,8 +141,11 @@ void Beep() {
bool GetLoginItemEnabled() {
BOOL enabled = NO;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// SMJobCopyDictionary does not work in sandbox (see rdar://13626319)
CFArrayRef jobs = SMCopyAllJobDictionaries(kSMDomainUserLaunchd);
#pragma clang diagnostic pop
NSArray* jobs_ = CFBridgingRelease(jobs);
NSString* identifier = GetLoginHelperBundleIdentifier();
if (jobs_ && [jobs_ count] > 0) {