Explorar o código

Resolve compiler warning about "Values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead"

John C. Daub %!s(int64=11) %!d(string=hai) anos
pai
achega
c81ab7f8f8
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      UIKit+AFNetworking/UIButton+AFNetworking.m

+ 2 - 2
UIKit+AFNetworking/UIButton+AFNetworking.m

@@ -50,7 +50,7 @@
 #pragma mark -
 
 static const char * af_imageRequestOperationKeyForState(UIControlState state) {
-    return [[NSString stringWithFormat:@"af_imageRequestOperationKeyForState_%lu", (NSUInteger)state] cStringUsingEncoding:NSASCIIStringEncoding];
+    return [[NSString stringWithFormat:@"af_imageRequestOperationKeyForState_%lu", (unsigned long)state] cStringUsingEncoding:NSASCIIStringEncoding];
 }
 
 - (AFHTTPRequestOperation *)af_imageRequestOperationForState:(UIControlState)state {
@@ -66,7 +66,7 @@ static const char * af_imageRequestOperationKeyForState(UIControlState state) {
 #pragma mark -
 
 static const char * af_backgroundImageRequestOperationKeyForState(UIControlState state) {
-    return [[NSString stringWithFormat:@"af_backgroundImageRequestOperationKeyForState_%lu", (NSUInteger)state] cStringUsingEncoding:NSASCIIStringEncoding];
+    return [[NSString stringWithFormat:@"af_backgroundImageRequestOperationKeyForState_%lu", (unsigned long)state] cStringUsingEncoding:NSASCIIStringEncoding];
 }
 
 - (AFHTTPRequestOperation *)af_backgroundImageRequestOperationForState:(UIControlState)state {