From 15e8270291197dcca558e0fd1bebbd67eaa47392 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 11 Jun 2022 13:09:23 -0700 Subject: [PATCH] Silence deprecation warnings when bumping deployment target (#2152) --- Autoupdate/SUSignatureVerifier.m | 4 ++-- InstallerLauncher/SUInstallerLauncher.m | 3 +++ Sparkle/SUApplicationInfo.m | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Autoupdate/SUSignatureVerifier.m b/Autoupdate/SUSignatureVerifier.m index ff3d0624..74aa9069 100644 --- a/Autoupdate/SUSignatureVerifier.m +++ b/Autoupdate/SUSignatureVerifier.m @@ -269,7 +269,6 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" __block SecGroupTransformRef group = SecTransformCreateGroupTransform(); -#pragma clang diagnostic pop __block SecTransformRef dataReadTransform = NULL; __block SecTransformRef dataDigestTransform = NULL; __block SecTransformRef dataVerifyTransform = NULL; @@ -301,7 +300,7 @@ return cleanup(); } - + #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdirect-ivar-access" dataVerifyTransform = SecVerifyTransformCreate(dsaPubKeySecKey, (__bridge CFDataRef)dsaSignature, &error); @@ -321,6 +320,7 @@ return cleanup(); } +#pragma clang diagnostic pop #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" diff --git a/InstallerLauncher/SUInstallerLauncher.m b/InstallerLauncher/SUInstallerLauncher.m index 68e0389d..179580f1 100644 --- a/InstallerLauncher/SUInstallerLauncher.m +++ b/InstallerLauncher/SUInstallerLauncher.m @@ -211,7 +211,10 @@ CFStringRef uti = (__bridge CFStringRef)[UTTypePNG identifier]; imageDestination = CGImageDestinationCreateWithURL((CFURLRef)tempIconDestinationURL, uti, 1, NULL); } else { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" imageDestination = CGImageDestinationCreateWithURL((CFURLRef)tempIconDestinationURL, kUTTypePNG, 1, NULL); +#pragma clang diagnostic pop } if (imageDestination != NULL) { CGImageDestinationAddImageFromSource(imageDestination, imageSource, imageIndex, (CFDictionaryRef)@{}); diff --git a/Sparkle/SUApplicationInfo.m b/Sparkle/SUApplicationInfo.m index d43e9080..4d9c11b0 100644 --- a/Sparkle/SUApplicationInfo.m +++ b/Sparkle/SUApplicationInfo.m @@ -42,8 +42,11 @@ UTType *contentType = isMainBundle ? UTTypeApplication : UTTypeBundle; icon = [[NSWorkspace sharedWorkspace] iconForContentType:contentType]; } else { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" NSString *fileType = isMainBundle ? (__bridge NSString *)kUTTypeApplication : (__bridge NSString *)kUTTypeBundle; icon = [[NSWorkspace sharedWorkspace] iconForFileType:fileType]; +#pragma clang diagnostic pop } } return icon;