diff --git a/Sparkle/SUCodeSigningVerifier.m b/Sparkle/SUCodeSigningVerifier.m index 73efc6c1..8690641b 100644 --- a/Sparkle/SUCodeSigningVerifier.m +++ b/Sparkle/SUCodeSigningVerifier.m @@ -52,7 +52,7 @@ // Note that kSecCSCheckNestedCode may not work with pre-Mavericks code signing. // See https://github.com/sparkle-project/Sparkle/issues/376#issuecomment-48824267 and https://developer.apple.com/library/mac/technotes/tn2206 - SecCSFlags flags = kSecCSDefaultFlags | kSecCSCheckAllArchitectures; + SecCSFlags flags = (SecCSFlags) (kSecCSDefaultFlags | kSecCSCheckAllArchitectures); result = SecStaticCodeCheckValidityWithErrors(staticCode, flags, requirement, &cfError); if (cfError) { @@ -108,7 +108,7 @@ finally: // Note that kSecCSCheckNestedCode may not work with pre-Mavericks code signing. // See https://github.com/sparkle-project/Sparkle/issues/376#issuecomment-48824267 and https://developer.apple.com/library/mac/technotes/tn2206 - SecCSFlags flags = kSecCSDefaultFlags | kSecCSCheckAllArchitectures; + SecCSFlags flags = (SecCSFlags) (kSecCSDefaultFlags | kSecCSCheckAllArchitectures); result = SecStaticCodeCheckValidityWithErrors(staticCode, flags, NULL, &cfError); if (cfError) { @@ -136,7 +136,7 @@ static id valueOrNSNull(id value) { + (void)logSigningInfoForCode:(SecStaticCodeRef)code label:(NSString*)label { CFDictionaryRef signingInfo = nil; - const SecCSFlags flags = kSecCSSigningInformation | kSecCSRequirementInformation | kSecCSDynamicInformation | kSecCSContentInformation; + const SecCSFlags flags = (SecCSFlags) (kSecCSSigningInformation | kSecCSRequirementInformation | kSecCSDynamicInformation | kSecCSContentInformation); if (SecCodeCopySigningInformation(code, flags, &signingInfo) == noErr) { NSDictionary *signingDict = CFBridgingRelease(signingInfo); NSMutableDictionary *relevantInfo = [NSMutableDictionary dictionary]; diff --git a/Sparkle/SUDSAVerifier.m b/Sparkle/SUDSAVerifier.m index 4789327e..fa5f9934 100644 --- a/Sparkle/SUDSAVerifier.m +++ b/Sparkle/SUDSAVerifier.m @@ -55,7 +55,7 @@ SecExternalItemType itemType = kSecItemTypePublicKey; CFArrayRef items = NULL; - OSStatus status = SecItemImport((__bridge CFDataRef)data, NULL, &format, &itemType, 0, NULL, NULL, &items); + OSStatus status = SecItemImport((__bridge CFDataRef)data, NULL, &format, &itemType, (SecItemImportExportFlags)0, NULL, NULL, &items); if (status != errSecSuccess || !items) { if (items) { CFRelease(items); @@ -65,7 +65,13 @@ } if (format == kSecFormatOpenSSL && itemType == kSecItemTypePublicKey && CFArrayGetCount(items) == 1) { + // Seems silly, but we can't quiet the warning about dropping CFTypeRef's const qualifier through + // any manner of casting I've tried, including interim explicit cast to void*. The -Wcast-qual + // warning is on by default with -Weverything and apparently became more noisy as of Xcode 7. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-qual" _secKey = (SecKeyRef)CFRetain(CFArrayGetValueAtIndex(items, 0)); +#pragma clang diagnostic pop } CFRelease(items); diff --git a/Sparkle/SUUpdateAlert.h b/Sparkle/SUUpdateAlert.h index 2db57bf4..fa643c81 100644 --- a/Sparkle/SUUpdateAlert.h +++ b/Sparkle/SUUpdateAlert.h @@ -9,9 +9,19 @@ #ifndef SUUPDATEALERT_H #define SUUPDATEALERT_H +#import #import "SUWindowController.h" #import "SUVersionDisplayProtocol.h" +// WebKit protocols are not explicitly declared until 10.11 SDK, so +// declare dummy protocols to keep the build working on earlier SDKs. +#if !defined(MAC_OS_X_VERSION_10_11) +@protocol WebFrameLoadDelegate +@end +@protocol WebPolicyDelegate +@end +#endif + @protocol SUUpdateAlertDelegate; typedef NS_ENUM(NSInteger, SUUpdateAlertChoice) { @@ -22,7 +32,7 @@ typedef NS_ENUM(NSInteger, SUUpdateAlertChoice) { }; @class WebView, SUAppcastItem, SUHost; -@interface SUUpdateAlert : SUWindowController +@interface SUUpdateAlert : SUWindowController @property (weak) id versionDisplayer;