From ab08e149e2b4a06233d92b377f42049d67ae5581 Mon Sep 17 00:00:00 2001 From: Indragie Karunaratne Date: Mon, 10 Mar 2014 22:09:02 -0600 Subject: [PATCH] Same fix as 6c7250e for 1.x branch Wrapping OSStatus and NSCAssert with NS_BLOCK_ASSERTIONS macro to prevent unused variable --- AFNetworking/AFURLConnectionOperation.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index 5bc688c..fc60600 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -108,8 +108,13 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat static NSData *AFSecKeyGetData(SecKeyRef key) { CFDataRef data = NULL; +#if defined(NS_BLOCK_ASSERTIONS) + SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data); +#else OSStatus status = SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data); NSCAssert(status == errSecSuccess, @"SecItemExport error: %ld", (long int)status); +#endif + NSCParameterAssert(data); return (__bridge_transfer NSData *)data;