Skip to content

Commit

Permalink
Quiet warning about casting away const-ness of CFTypeRef.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpunkass committed Jul 27, 2015
1 parent e084222 commit 93957e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sparkle/SUDSAVerifier.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ - (instancetype)initWithPublicKeyData:(NSData *)data
}

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);
Expand Down

0 comments on commit 93957e5

Please sign in to comment.