Fixing warnings: implicit conversion changes signedness: 'NSInteger' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
This commit is contained in:
parent
9cde4e4584
commit
3486a008a1
2 changed files with 9 additions and 9 deletions
|
|
@ -653,7 +653,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {}
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.stringEncoding = [aDecoder decodeIntegerForKey:@"stringEncoding"];
|
self.stringEncoding = (NSStringEncoding)[aDecoder decodeIntegerForKey:@"stringEncoding"];
|
||||||
self.parameterEncoding = [aDecoder decodeIntegerForKey:@"parameterEncoding"];
|
self.parameterEncoding = [aDecoder decodeIntegerForKey:@"parameterEncoding"];
|
||||||
self.registeredHTTPOperationClassNames = [aDecoder decodeObjectForKey:@"registeredHTTPOperationClassNames"];
|
self.registeredHTTPOperationClassNames = [aDecoder decodeObjectForKey:@"registeredHTTPOperationClassNames"];
|
||||||
self.defaultHeaders = [aDecoder decodeObjectForKey:@"defaultHeaders"];
|
self.defaultHeaders = [aDecoder decodeObjectForKey:@"defaultHeaders"];
|
||||||
|
|
@ -663,7 +663,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {}
|
||||||
|
|
||||||
- (void)encodeWithCoder:(NSCoder *)aCoder {
|
- (void)encodeWithCoder:(NSCoder *)aCoder {
|
||||||
[aCoder encodeObject:self.baseURL forKey:@"baseURL"];
|
[aCoder encodeObject:self.baseURL forKey:@"baseURL"];
|
||||||
[aCoder encodeInteger:self.stringEncoding forKey:@"stringEncoding"];
|
[aCoder encodeInteger:(NSInteger)self.stringEncoding forKey:@"stringEncoding"];
|
||||||
[aCoder encodeInteger:self.parameterEncoding forKey:@"parameterEncoding"];
|
[aCoder encodeInteger:self.parameterEncoding forKey:@"parameterEncoding"];
|
||||||
[aCoder encodeObject:self.registeredHTTPOperationClassNames forKey:@"registeredHTTPOperationClassNames"];
|
[aCoder encodeObject:self.registeredHTTPOperationClassNames forKey:@"registeredHTTPOperationClassNames"];
|
||||||
[aCoder encodeObject:self.defaultHeaders forKey:@"defaultHeaders"];
|
[aCoder encodeObject:self.defaultHeaders forKey:@"defaultHeaders"];
|
||||||
|
|
@ -945,7 +945,7 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bytesRead += [self.currentHTTPBodyPart read:&buffer[bytesRead] maxLength:length - bytesRead];
|
bytesRead += [self.currentHTTPBodyPart read:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)];
|
||||||
if (self.delay > 0.0f) {
|
if (self.delay > 0.0f) {
|
||||||
[NSThread sleepForTimeInterval:self.delay];
|
[NSThread sleepForTimeInterval:self.delay];
|
||||||
}
|
}
|
||||||
|
|
@ -1113,17 +1113,17 @@ typedef enum {
|
||||||
|
|
||||||
if (_phase == AFEncapsulationBoundaryPhase) {
|
if (_phase == AFEncapsulationBoundaryPhase) {
|
||||||
NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary() : AFMultipartFormEncapsulationBoundary()) dataUsingEncoding:self.stringEncoding];
|
NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary() : AFMultipartFormEncapsulationBoundary()) dataUsingEncoding:self.stringEncoding];
|
||||||
bytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[bytesRead] maxLength:(length - bytesRead)];
|
bytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_phase == AFHeaderPhase) {
|
if (_phase == AFHeaderPhase) {
|
||||||
NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding];
|
NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding];
|
||||||
bytesRead += [self readData:headersData intoBuffer:&buffer[bytesRead] maxLength:(length - bytesRead)];
|
bytesRead += [self readData:headersData intoBuffer:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_phase == AFBodyPhase) {
|
if (_phase == AFBodyPhase) {
|
||||||
if ([self.inputStream hasBytesAvailable]) {
|
if ([self.inputStream hasBytesAvailable]) {
|
||||||
bytesRead += [self.inputStream read:&buffer[bytesRead] maxLength:(length - bytesRead)];
|
bytesRead += [self.inputStream read:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self.inputStream hasBytesAvailable]) {
|
if (![self.inputStream hasBytesAvailable]) {
|
||||||
|
|
@ -1133,7 +1133,7 @@ typedef enum {
|
||||||
|
|
||||||
if (_phase == AFFinalBoundaryPhase) {
|
if (_phase == AFFinalBoundaryPhase) {
|
||||||
NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary() dataUsingEncoding:self.stringEncoding] : [NSData data]);
|
NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary() dataUsingEncoding:self.stringEncoding] : [NSData data]);
|
||||||
bytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[bytesRead] maxLength:(length - bytesRead)];
|
bytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)];
|
||||||
}
|
}
|
||||||
|
|
||||||
return bytesRead;
|
return bytesRead;
|
||||||
|
|
@ -1152,7 +1152,7 @@ typedef enum {
|
||||||
[self transitionToNextPhase];
|
[self transitionToNextPhase];
|
||||||
}
|
}
|
||||||
|
|
||||||
return range.length;
|
return (NSInteger)range.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)transitionToNextPhase {
|
- (BOOL)transitionToNextPhase {
|
||||||
|
|
|
||||||
|
|
@ -526,7 +526,7 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite
|
||||||
{
|
{
|
||||||
if (self.uploadProgress) {
|
if (self.uploadProgress) {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
self.uploadProgress(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);
|
self.uploadProgress((NSUInteger)bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue