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
+2 -2
View File
@@ -81,8 +81,8 @@
timestamp = (int) [[NSDate date] timeIntervalSince1970];
pGUID = [[NSProcessInfo processInfo] globallyUniqueString];
messageID = [NSString stringWithFormat: @"<%0X-%0X-%0X-%0X@%u>",
pid, timestamp, sequence, random(), [pGUID hash]];
messageID = [NSString stringWithFormat: @"<%0X-%0X-%0X-%0X@%lu>",
pid, timestamp, sequence, (unsigned int)random(), [pGUID hash]];
return [messageID lowercaseString];
}
+1 -1
View File
@@ -145,7 +145,7 @@ Class SOGoContactSourceFolderKlass = Nil;
[self _appendEntry: [resultEntries objectAtIndex: count]
toResult: result];
[result appendFormat: @"RESULT\ncode: %", resultCode];
[result appendFormat: @"RESULT\ncode: %d", resultCode];
[responseSocket
safeWriteData: [result dataUsingEncoding: NSASCIIStringEncoding]];
}
+1 -1
View File
@@ -97,7 +97,7 @@
rc = [self createFolder: folder withFM: fm];
if (!rc)
{
NSLog (@"Create directory failed at path %s", folder);
NSLog (@"Create directory failed at path %@", folder);
return NO;
}
+1 -1
View File
@@ -143,7 +143,7 @@
else
{
if (verbose)
NSLog(@"No session to remove", sessionsToDelete);
NSLog(@"No session to remove");
}
[cm releaseChannel: channel];
+1 -1
View File
@@ -227,7 +227,7 @@ typedef enum
NSMutableString *sql;
sql = [NSMutableString stringWithFormat: @"DELETE FROM %@" @" WHERE c_path like '/%@%'", [oc tableName], deviceId];
sql = [NSMutableString stringWithFormat: @"DELETE FROM %@ WHERE c_path like '/%@'", [oc tableName], deviceId];
[oc performBatchSQLQueries: [NSArray arrayWithObject: sql]];
rc = YES;
+1 -1
View File
@@ -175,7 +175,7 @@
now = [NSCalendarDate date];
delSql = [NSString stringWithFormat: @"UPDATE %@"
@" SET c_deleted = 1, c_lastmodified = %d,"
@" SET c_deleted = 1, c_lastmodified = %lu,"
@" c_content = ''"
@" WHERE c_name = '%@'",
tableName,
+2 -2
View File
@@ -148,7 +148,7 @@
if (sqlError)
{
[ac rollbackTransaction];
NSLog([sqlError reason]);
NSLog(@"%@", [sqlError reason]);
}
else
rc = [ac commitTransaction];
@@ -201,7 +201,7 @@
if (sqlError)
{
[ac rollbackTransaction];
NSLog([sqlError reason]);
NSLog(@"%@", [sqlError reason]);
}
else
rc = [ac commitTransaction];
+1 -1
View File
@@ -115,7 +115,7 @@ typedef enum
[theKey caseInsensitiveCompare: @"Vacation"] == NSOrderedSame)
{
/* credentials file handling */
NSString *credsFilename, *authname, *authpwd;
NSString *credsFilename=nil, *authname=nil, *authpwd=nil;
SOGoCredentialsFile *cf;
credsFilename = [[NSUserDefaults standardUserDefaults] stringForKey: @"p"];
+1 -1
View File
@@ -149,7 +149,7 @@
command, [currentTool objectAtIndex: 1]];
}
NSLog (helpString);
NSLog (@"%@", helpString);
}
- (void) registerTools