Line 0
Link Here
|
|
|
1 |
--- SoObjects/SOGo/SOGoCacheGCSObject.m.orig 2015-10-08 11:38:29.151675385 +0800 |
2 |
+++ SoObjects/SOGo/SOGoCacheGCSObject.m 2015-10-08 12:09:29.854549665 +0800 |
3 |
@@ -87,7 +87,7 @@ |
4 |
{ |
5 |
tableUrl = nil; |
6 |
initialized = NO; |
7 |
- objectType = -1; |
8 |
+ objectType = (SOGoCacheObjectType) -1; |
9 |
deleted = NO; |
10 |
version = 0; |
11 |
} |
12 |
@@ -383,7 +383,7 @@ |
13 |
@"SELECT * FROM %@ WHERE c_path = %@", |
14 |
tableName, pathValue]; |
15 |
if (startVersion > -1) |
16 |
- [sql appendFormat: @" AND c_version > %d", startVersion]; |
17 |
+ [sql appendFormat: @" AND c_version > %d", (int)startVersion]; |
18 |
|
19 |
/* execution */ |
20 |
records = [self performSQLQuery: sql]; |
21 |
@@ -411,18 +411,16 @@ |
22 |
|
23 |
tableName = [self tableName]; |
24 |
adaptor = [self tableChannelAdaptor]; |
25 |
- pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@", deviceId] |
26 |
- forAttribute: textColumn]; |
27 |
|
28 |
/* query */ |
29 |
sql = [NSMutableString stringWithFormat: |
30 |
@"SELECT * FROM %@ WHERE c_type = %d AND c_deleted <> 1", tableName, objectType]; |
31 |
|
32 |
if (startVersion > -1) |
33 |
- [sql appendFormat: @" AND c_version > %d", startVersion]; |
34 |
+ [sql appendFormat: @" AND c_version > %d", (int)startVersion]; |
35 |
|
36 |
if (deviceId) { |
37 |
- pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@%", deviceId] |
38 |
+ pathValue = [adaptor formatValue: [NSString stringWithFormat: @"/%@", deviceId] |
39 |
forAttribute: textColumn]; |
40 |
[sql appendFormat: @" AND c_path like %@", pathValue]; |
41 |
} |
42 |
@@ -546,7 +544,7 @@ |
43 |
|
44 |
lastModifiedValue = (NSInteger) [lastModified timeIntervalSince1970]; |
45 |
|
46 |
- if (objectType == -1) |
47 |
+ if (objectType == (SOGoCacheObjectType) -1) |
48 |
[NSException raise: @"SOGoCacheIOException" |
49 |
format: @"object type has not been set for object '%@'", |
50 |
self]; |
51 |
@@ -576,7 +574,7 @@ |
52 |
@")"), |
53 |
tableName, |
54 |
pathValue, parentPathValue, objectType, |
55 |
- creationDateValue, lastModifiedValue, |
56 |
+ (int)creationDateValue, (int)lastModifiedValue, |
57 |
propsValue]; |
58 |
isNew = NO; |
59 |
} |
60 |
@@ -590,7 +588,7 @@ |
61 |
@" c_version = %d, c_content = %@" |
62 |
@" WHERE c_path = %@"), |
63 |
tableName, |
64 |
- lastModifiedValue, deletedValue, version, propsValue, |
65 |
+ (int)lastModifiedValue, (int)deletedValue, (int)version, propsValue, |
66 |
pathValue]; |
67 |
} |
68 |
|