Stage 1 of clang compiler warning patches.

This commit is contained in:
Euan Thoms
2015-10-31 14:10:03 +08:00
parent 0b490a00c6
commit 3c62cc744e
85 changed files with 185 additions and 165 deletions
+4 -4
View File
@@ -551,9 +551,9 @@ static NSData* _sanitizeContent(NSData *theData)
else
skipAttribute = YES;
}
else if ([name isEqualToString: @"background"] ||
else if (([name isEqualToString: @"background"] ||
([name isEqualToString: @"data"]
|| [name isEqualToString: @"classid"])
|| [name isEqualToString: @"classid"]))
&& [lowerName isEqualToString: @"object"])
{
value = [_attributes valueAtIndex: count];
@@ -741,7 +741,7 @@ static NSData* _sanitizeContent(NSData *theData)
/* SaxLexicalHandler */
- (void) comment: (unichar *) _chars
length: (NSUInteger) _len
length: (int) _len
{
showWhoWeAre();
if (inStyle)
@@ -807,7 +807,7 @@ static NSData* _sanitizeContent(NSData *theData)
}
[dump appendFormat: @"--- end ---\n"];
NSLog(dump);
NSLog(@"%@", dump);
[dump release];
}
@@ -228,7 +228,7 @@
info = [parts objectAtIndex: i];
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
[viewer setBodyInfo: info];
[viewer setPartPath: [[self contentPartPath] arrayByAddingObject: [NSString stringWithFormat: @"%d", i+1]]];
[viewer setPartPath: [[self contentPartPath] arrayByAddingObject: [NSString stringWithFormat: @"%d", (int)i+1]]];
[renderedParts addObject: [viewer renderedPart]];
}
}
+1 -1
View File
@@ -33,7 +33,7 @@
- (void) setChildInfo: (id) _info;
- (id) childInfo;
- (void) setChildIndex: (unsigned int) _index;
- (void) setChildIndex: (NSUInteger) _index;
- (id) childPartPath;
+1 -1
View File
@@ -61,7 +61,7 @@
return [NSString stringWithFormat: @"%u",
(unsigned int) ([self childIndex] + 1)];
char buf[8];
sprintf(buf, "%d", [self childIndex] + 1);
sprintf(buf, "%d", (int)[self childIndex] + 1);
return [NSString stringWithCString:buf];
}
+1 -1
View File
@@ -287,7 +287,7 @@
if ([filename length])
// We replace any slash by a dash since Apache won't allow encoded slashes by default.
// See http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes
filename = [filename stringByReplacingString: @"/" withString: @"-"];
filename = [[filename stringByReplacingString: @"/" withString: @"-"] mutableCopy];
else
[filename appendFormat: @"%@-%@",
[self labelForKey: @"Untitled"],