Don't use NSUInteger as format argument, add explicit cast instead
This commit is contained in:
parent
a89fede6dd
commit
6aa3346e98
1 changed files with 2 additions and 2 deletions
|
|
@ -149,8 +149,8 @@ static void AFSwizzleClassMethodWithClassAndSelectorUsingBlock(Class klass, SEL
|
||||||
[userInfo setValue:self.response forKey:AFNetworkingOperationFailingURLResponseErrorKey];
|
[userInfo setValue:self.response forKey:AFNetworkingOperationFailingURLResponseErrorKey];
|
||||||
|
|
||||||
if (![self hasAcceptableStatusCode]) {
|
if (![self hasAcceptableStatusCode]) {
|
||||||
NSUInteger statusCode = ([self.response isKindOfClass:[NSHTTPURLResponse class]]) ? (NSUInteger)[self.response statusCode] : 200;
|
NSInteger statusCode = ([self.response isKindOfClass:[NSHTTPURLResponse class]]) ? [self.response statusCode] : 200;
|
||||||
[userInfo setValue:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Expected status code in (%@), got %d", @"AFNetworking", nil), AFStringFromIndexSet([[self class] acceptableStatusCodes]), statusCode] forKey:NSLocalizedDescriptionKey];
|
[userInfo setValue:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Expected status code in (%@), got %ld", @"AFNetworking", nil), AFStringFromIndexSet([[self class] acceptableStatusCodes]), (long)statusCode] forKey:NSLocalizedDescriptionKey];
|
||||||
self.HTTPError = [[NSError alloc] initWithDomain:AFNetworkingErrorDomain code:NSURLErrorBadServerResponse userInfo:userInfo];
|
self.HTTPError = [[NSError alloc] initWithDomain:AFNetworkingErrorDomain code:NSURLErrorBadServerResponse userInfo:userInfo];
|
||||||
} else if (![self hasAcceptableContentType]) {
|
} else if (![self hasAcceptableContentType]) {
|
||||||
// Don't invalidate content type if there is no content
|
// Don't invalidate content type if there is no content
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue