Prevent compilation failures with old gcc versions

This commit is contained in:
Ludovic Marcotte 2014-12-09 07:21:34 -05:00
parent 12788c847d
commit 64637d842b

View file

@ -110,9 +110,11 @@ typedef enum
NSString *urlString, *ocFSTableName, *deviceId;
NSURL *folderTableURL;
NSMutableArray *parts;
NSArray *entries;
id cacheEntry;
BOOL rc;
int max;
int i, max;
max = [sanitizedArguments count];
rc = NO;
@ -156,9 +158,13 @@ typedef enum
[oc setObjectType: ActiveSyncGlobalCacheObject];
[oc setTableUrl: folderTableURL];
entries = [oc cacheEntriesForDeviceId: nil newerThanVersion: -1];
for (id cacheEntry in [oc cacheEntriesForDeviceId: nil newerThanVersion: -1])
for (i = 0; i < [entries count]; i++)
{
cacheEntry = [entries objectAtIndex: i];
fprintf(stdout,"%s\n", [[cacheEntry substringFromIndex: 1] UTF8String]);
}
rc = YES;
break;
@ -173,8 +179,11 @@ typedef enum
[oc setObjectType: ActiveSyncFolderCacheObject];
[oc setTableUrl: folderTableURL];
entries = [oc cacheEntriesForDeviceId: deviceId newerThanVersion: -1];
for (id cacheEntry in [oc cacheEntriesForDeviceId: deviceId newerThanVersion: -1]) {
for (i = 0; i < [entries count]; i++)
{
cacheEntry = [entries objectAtIndex: i];
fprintf(stdout,"Folder Key: %s\n", [[cacheEntry substringFromIndex: 1] UTF8String]);
foc = [SOGoCacheGCSObject objectWithName: [cacheEntry substringFromIndex: 1] inContainer: nil];
@ -187,7 +196,6 @@ typedef enum
if (verbose)
fprintf(stdout, " metadata Name: %s\n\n", [[[foc properties] description] UTF8String]);
}
rc = YES;