Skip to content
Browse files

Fix compiler warnings from newer Clang

Most of these are printf format specifier inconsistencies, especially involving NSInteger and NSUInteger.
  • Loading branch information...
1 parent 605e263 commit 4f4d10c22e3c0231be82de82d88e3ae14e56611d @snej snej committed Jun 29, 2012
Showing with 4 additions and 3 deletions.
  1. +3 −2 Categories/NSMutableURLRequest+Parameters.m
  2. +1 −1 OAMutableURLRequest.m
View
5 Categories/NSMutableURLRequest+Parameters.m
@@ -82,7 +82,8 @@ - (void)setParameters:(NSArray *)parameters
- (void)setHTTPBodyWithString:(NSString *)body {
NSData *bodyData = [body dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
- [self setValue:[NSString stringWithFormat:@"%d", [bodyData length]] forHTTPHeaderField:@"Content-Length"];
+ [self setValue:[NSString stringWithFormat:@"%u", (unsigned)[bodyData length]]
+ forHTTPHeaderField:@"Content-Length"];
[self setHTTPBody:bodyData];
}
@@ -105,7 +106,7 @@ - (void)attachFileWithName:(NSString *)name filename:(NSString*)filename content
[bodyData appendData:data];
[bodyData appendData:[[[@"\r\n--" stringByAppendingString:Boundary] stringByAppendingString:@"--"] dataUsingEncoding:NSUTF8StringEncoding]];
- [self setValue:[NSString stringWithFormat:@"%d", [bodyData length]] forHTTPHeaderField:@"Content-Length"];
+ [self setValue:[NSString stringWithFormat:@"%u", (unsigned)[bodyData length]] forHTTPHeaderField:@"Content-Length"];
[self setHTTPBody:bodyData];
[bodyData release];
}
View
2 OAMutableURLRequest.m
@@ -125,7 +125,7 @@ - (void)prepare {
- (void)_generateTimestamp {
[timestamp release];
- timestamp = [[NSString alloc]initWithFormat:@"%d", time(NULL)];
+ timestamp = [[NSString alloc]initWithFormat:@"%ld", time(NULL)];
}
- (void)_generateNonce {

0 comments on commit 4f4d10c

Please sign in to comment.
Something went wrong with that request. Please try again.