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

View File

@@ -87,7 +87,7 @@ static EOAttribute *textColumn = nil;
{
tableUrl = nil;
initialized = NO;
objectType = -1;
objectType = (SOGoCacheObjectType) -1;
deleted = NO;
version = 0;
}
@@ -394,7 +394,7 @@ static EOAttribute *textColumn = nil;
@"SELECT * FROM %@ WHERE c_path = %@",
tableName, pathValue];
if (startVersion > -1)
[sql appendFormat: @" AND c_version > %d", startVersion];
[sql appendFormat: @" AND c_version > %d", (int)startVersion];
/* execution */
records = [self performSQLQuery: sql];
@@ -422,18 +422,16 @@ static EOAttribute *textColumn = nil;
tableName = [self tableName];
adaptor = [self tableChannelAdaptor];
pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@", deviceId]
forAttribute: textColumn];
/* query */
sql = [NSMutableString stringWithFormat:
@"SELECT * FROM %@ WHERE c_type = %d AND c_deleted <> 1", tableName, objectType];
if (startVersion > -1)
[sql appendFormat: @" AND c_version > %d", startVersion];
[sql appendFormat: @" AND c_version > %d", (int)startVersion];
if (deviceId) {
pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@%", deviceId]
pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@", deviceId]
forAttribute: textColumn];
[sql appendFormat: @" AND c_path like %@", pathValue];
}
@@ -557,7 +555,7 @@ static EOAttribute *textColumn = nil;
lastModifiedValue = (NSInteger) [lastModified timeIntervalSince1970];
if (objectType == -1)
if (objectType == (SOGoCacheObjectType) -1)
[NSException raise: @"SOGoCacheIOException"
format: @"object type has not been set for object '%@'",
self];
@@ -587,7 +585,7 @@ static EOAttribute *textColumn = nil;
@")"),
tableName,
pathValue, parentPathValue, objectType,
creationDateValue, lastModifiedValue,
(int)creationDateValue, (int)lastModifiedValue,
propsValue];
isNew = NO;
}
@@ -601,7 +599,7 @@ static EOAttribute *textColumn = nil;
@" c_version = %d, c_content = %@"
@" WHERE c_path = %@"),
tableName,
lastModifiedValue, deletedValue, version, propsValue,
(int)lastModifiedValue, (int)deletedValue, (int)version, propsValue,
pathValue];
}