From 0b4c355c2c46ed61e2c982002a72e0e277f46847 Mon Sep 17 00:00:00 2001 From: Euan Thoms Date: Wed, 4 Nov 2015 05:37:39 +0800 Subject: [PATCH 1/5] Stage 6 of clang compiler warning patches. --- .../Appointments/SOGoCalendarComponent.m | 7 ++++ SoObjects/SOGo/SOGoParentFolder.h | 1 + SoObjects/SOGo/SOGoParentFolder.m | 32 +++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index ce600715b..94ce2e383 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -140,6 +140,13 @@ return aclManager; } +- (NSException *) changeParticipationStatus: (NSString *) newPartStat + withDelegate: (iCalPerson *) delegate + alarm: (iCalAlarm *) alarm; +{ + return nil; +} + - (id) init { if ((self = [super init])) diff --git a/SoObjects/SOGo/SOGoParentFolder.h b/SoObjects/SOGo/SOGoParentFolder.h index 97cf89f8e..4d6ef211c 100644 --- a/SoObjects/SOGo/SOGoParentFolder.h +++ b/SoObjects/SOGo/SOGoParentFolder.h @@ -45,6 +45,7 @@ - (NSException *) appendPersonalSources; - (void) removeSubFolder: (NSString *) subfolderName; +- (NSException *) appendCollectedSources; - (void) setBaseOCSPath: (NSString *) newOCSPath; diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 501f90f9f..16b640791 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -423,6 +423,38 @@ static SoSecurityManager *sm = nil; return error; } +- (NSException *) appendCollectedSources +{ + GCSChannelManager *cm; + EOAdaptorChannel *fc; + NSURL *folderLocation; + NSString *sql, *gcsFolderType; + NSException *error; + + cm = [GCSChannelManager defaultChannelManager]; + folderLocation = [[GCSFolderManager defaultFolderManager] folderInfoLocation]; + fc = [cm acquireOpenChannelForURL: folderLocation]; + if ([fc isOpen]) + { + gcsFolderType = [[self class] gcsFolderType]; + + sql = [NSString stringWithFormat: (@"SELECT c_path4 FROM %@" + @" WHERE c_path2 = '%@'" + @" AND c_folder_type = '%@'"), + [folderLocation gcsTableName], owner, gcsFolderType]; + + error = [self fetchSpecialFolders: sql withChannel: fc andFolderType: SOGoCollectedFolder]; + + [cm releaseChannel: fc]; + } + else + error = [NSException exceptionWithName: @"SOGoDBException" + reason: @"database connection could not be open" + userInfo: nil]; + + return error; +} + - (NSException *) initSubFolders { NSException *error; From 0cb1504f2c847528a690fcbe83c2fe5c1d3579c4 Mon Sep 17 00:00:00 2001 From: ethoms Date: Wed, 4 Nov 2015 08:18:23 +0800 Subject: [PATCH 2/5] Update SOGoCalendarComponent.m --- SoObjects/Appointments/SOGoCalendarComponent.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 94ce2e383..d2df0755f 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -142,8 +142,9 @@ - (NSException *) changeParticipationStatus: (NSString *) newPartStat withDelegate: (iCalPerson *) delegate - alarm: (iCalAlarm *) alarm; + alarm: (iCalAlarm *) alarm { + // Required for protocol return nil; } From becfdc215fb11c53727c24e73d2b87af2f16bb8e Mon Sep 17 00:00:00 2001 From: ethoms Date: Thu, 5 Nov 2015 07:20:36 +0800 Subject: [PATCH 3/5] Update SOGoParentFolder.h --- SoObjects/SOGo/SOGoParentFolder.h | 1 - 1 file changed, 1 deletion(-) diff --git a/SoObjects/SOGo/SOGoParentFolder.h b/SoObjects/SOGo/SOGoParentFolder.h index 4d6ef211c..97cf89f8e 100644 --- a/SoObjects/SOGo/SOGoParentFolder.h +++ b/SoObjects/SOGo/SOGoParentFolder.h @@ -45,7 +45,6 @@ - (NSException *) appendPersonalSources; - (void) removeSubFolder: (NSString *) subfolderName; -- (NSException *) appendCollectedSources; - (void) setBaseOCSPath: (NSString *) newOCSPath; From efbf8825b106b6b9a762d51ef94643ad1d760cf3 Mon Sep 17 00:00:00 2001 From: ethoms Date: Thu, 5 Nov 2015 07:29:45 +0800 Subject: [PATCH 4/5] Update SOGoParentFolder.m --- SoObjects/SOGo/SOGoParentFolder.m | 34 +------------------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 16b640791..35e5d842b 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -423,38 +423,6 @@ static SoSecurityManager *sm = nil; return error; } -- (NSException *) appendCollectedSources -{ - GCSChannelManager *cm; - EOAdaptorChannel *fc; - NSURL *folderLocation; - NSString *sql, *gcsFolderType; - NSException *error; - - cm = [GCSChannelManager defaultChannelManager]; - folderLocation = [[GCSFolderManager defaultFolderManager] folderInfoLocation]; - fc = [cm acquireOpenChannelForURL: folderLocation]; - if ([fc isOpen]) - { - gcsFolderType = [[self class] gcsFolderType]; - - sql = [NSString stringWithFormat: (@"SELECT c_path4 FROM %@" - @" WHERE c_path2 = '%@'" - @" AND c_folder_type = '%@'"), - [folderLocation gcsTableName], owner, gcsFolderType]; - - error = [self fetchSpecialFolders: sql withChannel: fc andFolderType: SOGoCollectedFolder]; - - [cm releaseChannel: fc]; - } - else - error = [NSException exceptionWithName: @"SOGoDBException" - reason: @"database connection could not be open" - userInfo: nil]; - - return error; -} - - (NSException *) initSubFolders { NSException *error; @@ -465,7 +433,7 @@ static SoSecurityManager *sm = nil; error = [self appendPersonalSources]; if (!error) if ([self respondsToSelector:@selector(appendCollectedSources)]) - error = [self appendCollectedSources]; + error = [self respondsToSelector:@selector(appendCollectedSources)]; if (!error) error = [self appendSystemSources]; // TODO : Not really a testcase, see function if (error) From 4ca3a1f42d1b8548a3d63c816b76a14a51ce347a Mon Sep 17 00:00:00 2001 From: ethoms Date: Thu, 5 Nov 2015 08:01:38 +0800 Subject: [PATCH 5/5] Update SOGoParentFolder.m --- SoObjects/SOGo/SOGoParentFolder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 35e5d842b..eb454dc97 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -433,7 +433,7 @@ static SoSecurityManager *sm = nil; error = [self appendPersonalSources]; if (!error) if ([self respondsToSelector:@selector(appendCollectedSources)]) - error = [self respondsToSelector:@selector(appendCollectedSources)]; + error = [self performSelector:@selector(appendCollectedSources)]; if (!error) error = [self appendSystemSources]; // TODO : Not really a testcase, see function if (error)