Silence deprecation warnings when bumping deployment target (#2152)

This commit is contained in:
Zorg authored and GitHub committed 2022-06-11 13:09:23 -07:00
1 parent d7942768b8
commit 15e8270291
3 files changed
+8 -2

No files matched your search

+2 -2
View File
@@ -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"
+3
View File
@@ -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)@{});
+3
View File
@@ -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;