From 3d2e5adee83a87ba5141cc329d8a0ad25a9c2b73 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 23 Jun 2020 13:02:49 -0400 Subject: [PATCH] fix(eas): gcc v10 compat fixes (fixes #5029) --- ActiveSync/SOGoActiveSyncDispatcher+Sync.m | 4 ++-- ActiveSync/SOGoActiveSyncDispatcher.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m index 0f5283b16..0e2072414 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m +++ b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m @@ -2153,7 +2153,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Cache-entry still exists but folder doesn't exists or synchronize flag is not set. // We ignore the folder and wait for foldersync to do the cleanup. - if (!(mfCollection && [mfCollection synchronize])) + if (!(mfCollection && [(SOGoGCSFolder*)mfCollection synchronize])) { if (debugOn) [self logWithFormat: @"EAS - Folder %@ not found. Ignoring ...", folderName]; @@ -2187,7 +2187,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. realCollectionId = [folderName realCollectionIdWithFolderType: &mergedFolderType]; mfCollection = [self collectionFromId: realCollectionId type: mergedFolderType]; - if (!(mfCollection && [mfCollection synchronize])) + if (!(mfCollection && [(SOGoGCSFolder*)mfCollection synchronize])) { if (debugOn) [self logWithFormat: @"EAS - Folder %@ not found. Reset personal folder to cleanup", folderName]; diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m index 6122a2d0b..31ab9b952 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher.m +++ b/ActiveSync/SOGoActiveSyncDispatcher.m @@ -969,7 +969,7 @@ void handle_eas_terminate(int signum) } // Remove the folder from device if it doesn't exist, or don't want to sync it. - if (!currentFolder || !([currentFolder synchronize])) + if (!currentFolder || !([(SOGoGCSFolder*)currentFolder synchronize])) { // Don't send a delete when MergedFoler is set, we have done it above. // Windows Phones don't like when a -folder is sent twice. @@ -1124,7 +1124,7 @@ void handle_eas_terminate(int signum) continue; if (![currentFolder isKindOfClass: [SOGoGCSFolder class]] || - ![currentFolder synchronize]) + ![(SOGoGCSFolder*)currentFolder synchronize]) { [folders removeObjectAtIndex: count]; continue;