Skip to content

Commit

Permalink
Quiet warnings generated by -Wassign-enum by casting to the expected …
Browse files Browse the repository at this point in the history
…enum type. Most of these warnings are inevitable because of the design of the enum type to separately declare enum constants for specific APIs, but to stick to the more generic shared enum type in the function prototype.
  • Loading branch information
danielpunkass committed Jul 27, 2015
1 parent ca86ce0 commit e084222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sparkle/SUCodeSigningVerifier.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ + (BOOL)codeSignatureMatchesHostAndIsValidAtPath:(NSString *)applicationPath err

// 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) {
Expand Down Expand Up @@ -108,7 +108,7 @@ + (BOOL)codeSignatureIsValidAtPath:(NSString *)applicationPath error:(NSError *_

// 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) {
Expand Down Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion Sparkle/SUDSAVerifier.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ - (instancetype)initWithPublicKeyData:(NSData *)data
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);
Expand Down

0 comments on commit e084222

Please sign in to comment.