From 08f05ac2ef532edc60f99fc1c92add7dbb75a5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Amor=20Garc=C3=ADa?= Date: Mon, 9 Nov 2015 19:06:36 +0100 Subject: [PATCH] sogo-openchange: Avoid compile warnings after changes in exchange.idl The changes in the exchange.idl file from OpenChange has changed some string pointers from 'const char *' to 'uint8_t *'. This changeset cast them to avoid compilation warnings. --- OpenChange/MAPIStoreDBFolder.m | 2 +- OpenChange/MAPIStoreMailFolder.m | 2 +- OpenChange/MAPIStoreTypes.m | 2 +- OpenChange/NSArray+MAPIStore.m | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenChange/MAPIStoreDBFolder.m b/OpenChange/MAPIStoreDBFolder.m index d1734dc7c..9e7a6d713 100644 --- a/OpenChange/MAPIStoreDBFolder.m +++ b/OpenChange/MAPIStoreDBFolder.m @@ -102,7 +102,7 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact"; { value = get_SPropValue_SRow (aRow, PidTagDisplayName_string8); if (value) - folderName = [NSString stringWithUTF8String: value->value.lpszA]; + folderName = [NSString stringWithUTF8String: (const char *) value->value.lpszA]; else folderName = nil; } diff --git a/OpenChange/MAPIStoreMailFolder.m b/OpenChange/MAPIStoreMailFolder.m index 7492f27bd..6934e7a60 100644 --- a/OpenChange/MAPIStoreMailFolder.m +++ b/OpenChange/MAPIStoreMailFolder.m @@ -181,7 +181,7 @@ static Class SOGoMailFolderK, MAPIStoreMailFolderK, MAPIStoreOutboxFolderK; if (aRow->lpProps[i].ulPropTag == PR_DISPLAY_NAME_UNICODE) folderName = [NSString stringWithUTF8String: aRow->lpProps[i].value.lpszW]; else if (aRow->lpProps[i].ulPropTag == PR_DISPLAY_NAME) - folderName = [NSString stringWithUTF8String: aRow->lpProps[i].value.lpszA]; + folderName = [NSString stringWithUTF8String: (const char *) aRow->lpProps[i].value.lpszA]; } if (folderName) diff --git a/OpenChange/MAPIStoreTypes.m b/OpenChange/MAPIStoreTypes.m index 76e72c5d6..eb3b499b3 100644 --- a/OpenChange/MAPIStoreTypes.m +++ b/OpenChange/MAPIStoreTypes.m @@ -198,7 +198,7 @@ NSObjectFromSPropValue (const struct SPropValue *value) break; case PT_STRING8: result = (value->value.lpszA - ? [NSString stringWithUTF8String: value->value.lpszA] + ? [NSString stringWithUTF8String: (const char *) value->value.lpszA] : (id) @""); break; case PT_SYSTIME: diff --git a/OpenChange/NSArray+MAPIStore.m b/OpenChange/NSArray+MAPIStore.m index fcb7d3896..be54e9259 100644 --- a/OpenChange/NSArray+MAPIStore.m +++ b/OpenChange/NSArray+MAPIStore.m @@ -228,7 +228,7 @@ mvResult = [NSMutableArray arrayWithCapacity: mvString->cValues]; for (count = 0; count < mvString->cValues; count++) { - subObject = [NSString stringWithUTF8String: mvString->lppszA[count]]; + subObject = [NSString stringWithUTF8String: (const char *) mvString->lppszA[count]]; [mvResult addObject: subObject]; }