Ver Fonte

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 há 11 anos atrás
pai
commit
c81ab7f8f8
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      UIKit+AFNetworking/UIButton+AFNetworking.m

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

@@ -50,7 +50,7 @@
 #pragma mark -
 #pragma mark -
 
 
 static const char * af_imageRequestOperationKeyForState(UIControlState state) {
 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 {
 - (AFHTTPRequestOperation *)af_imageRequestOperationForState:(UIControlState)state {
@@ -66,7 +66,7 @@ static const char * af_imageRequestOperationKeyForState(UIControlState state) {
 #pragma mark -
 #pragma mark -
 
 
 static const char * af_backgroundImageRequestOperationKeyForState(UIControlState state) {
 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 {
 - (AFHTTPRequestOperation *)af_backgroundImageRequestOperationForState:(UIControlState)state {