From 9f38201b6c8a356798868decda9f4331bba4768f Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 7 Sep 2021 13:43:15 -0400 Subject: [PATCH] fix(addressbook): fix compilation warnings in UIxContactFoldersView.m --- UI/Contacts/UIxContactFoldersView.m | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index e2c7d3742..a644dcb73 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -1,6 +1,6 @@ /* UIxContactFoldersView.m - this file is part of SOGo * - * Copyright (C) 2006-2016 Inverse inc. + * Copyright (C) 2006-2021 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ #import +#import #import #import #import @@ -283,7 +284,7 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK; NSString *userLogin, *owner; NSArray *folders, *allACLs; NSDictionary *folderAttrs; - id currentFolder; + SOGoFolder *currentFolder; BOOL objectCreator, objectEditor, objectEraser, synchronize; int max, i; @@ -305,11 +306,11 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK; if ([currentFolder respondsToSelector: @selector(cardDavURL)]) { urls = [NSMutableDictionary dictionaryWithObjectsAndKeys: - [currentFolder cardDavURL], @"cardDavURL", + [(SOGoContactGCSFolder *)currentFolder cardDavURL], @"cardDavURL", nil]; if ([self isPublicAccessEnabled]) { - [urls setObject: [currentFolder publicCardDavURL] forKey: @"publicCardDavURL"]; + [urls setObject: [(SOGoContactGCSFolder *)currentFolder publicCardDavURL] forKey: @"publicCardDavURL"]; } } @@ -323,7 +324,7 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK; [NSNumber numberWithBool: objectEraser], @"objectEraser", nil]; if ([currentFolder isKindOfClass: SOGoGCSFolderK]) - synchronize = [currentFolder synchronize]; + synchronize = [(SOGoGCSFolder *)currentFolder synchronize]; else synchronize = NO; @@ -339,12 +340,12 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK; owner, @"owner", [NSNumber numberWithBool: [currentFolder isKindOfClass: SOGoGCSFolderK]], @"isEditable", [NSNumber numberWithBool: [currentFolder isKindOfClass: SOGoContactSourceFolderK] - && ![currentFolder isPersonalSource]], @"isRemote", + && ![(SOGoContactSourceFolder *)currentFolder isPersonalSource]], @"isRemote", [NSNumber numberWithBool: [currentFolder isKindOfClass: SOGoContactSourceFolderK] - && [currentFolder listRequiresDot]], @"listRequiresDot", + && [(SOGoContactSourceFolder *)currentFolder listRequiresDot]], @"listRequiresDot", acls, @"acls", urls, @"urls", - [currentFolder searchFields], @"searchFields", + [()currentFolder searchFields], @"searchFields", nil]; [foldersAttrs addObject: folderAttrs]; }