From b4edfb982b046aa651f18e647d394a359e6e57fb Mon Sep 17 00:00:00 2001 From: Gwangbok Kim Date: Thu, 8 Aug 2013 17:34:00 +0900 Subject: [PATCH] type casting unsigned int to int Change-Id: I96b21217907641790e2d508b37e34e8c0ad145be Signed-off-by: Gwangbok Kim --- src/FScl_AddressbookImpl.cpp | 4 ++-- src/FScl_AddressbookManagerImpl.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/FScl_AddressbookImpl.cpp b/src/FScl_AddressbookImpl.cpp index 8bb083a..ac2d0c4 100644 --- a/src/FScl_AddressbookImpl.cpp +++ b/src/FScl_AddressbookImpl.cpp @@ -484,7 +484,7 @@ _AddressbookImpl::UpdateContact(const Contact& contact) int imageId = -1; int imageId2 = -1; - for (unsigned int i = count2 - 1; i >= 0; i--) + for (int i = (int)count2 - 1; i >= 0; i--) { contacts_record_get_child_record_at_p(recordHandle, _contacts_contact.image, i, &imageHandle); contacts_record_get_int(imageHandle, _contacts_image.id, &imageId); @@ -495,7 +495,7 @@ _AddressbookImpl::UpdateContact(const Contact& contact) bool matchFound = false; - for (int j = 0; j < count; j++) + for (unsigned int j = 0; j < count; j++) { contacts_record_get_child_record_at_p(newRecordHandle, _contacts_contact.image, i, &imageHandle2); contacts_record_get_int(imageHandle2, _contacts_image.id, &imageId2); diff --git a/src/FScl_AddressbookManagerImpl.cpp b/src/FScl_AddressbookManagerImpl.cpp index 1bb2e1b..8acd001 100644 --- a/src/FScl_AddressbookManagerImpl.cpp +++ b/src/FScl_AddressbookManagerImpl.cpp @@ -508,7 +508,7 @@ _AddressbookManagerImpl::UpdateContact(const Contact& contact) int imageId = -1; int imageId2 = -1; - for (int i = count2 - 1; i >= 0; i--) + for (int i = (int)count2 - 1; i >= 0; i--) { contacts_record_get_child_record_at_p(recordHandle, _contacts_contact.image, i, &imageHandle); contacts_record_get_int(imageHandle, _contacts_image.id, &imageId); @@ -519,7 +519,7 @@ _AddressbookManagerImpl::UpdateContact(const Contact& contact) bool matchFound = false; - for (int j = 0; j < count; j++) + for (unsigned int j = 0; j < count; j++) { contacts_record_get_child_record_at_p(newRecordHandle, _contacts_contact.image, i, &imageHandle2); contacts_record_get_int(imageHandle2, _contacts_image.id, &imageId2); @@ -547,13 +547,13 @@ _AddressbookManagerImpl::UpdateContact(const Contact& contact) char* pCharValue = null; String tempPath; - for (int i = 0; i < count; i++) + for (unsigned int i = 0; i < count; i++) { contacts_record_get_child_record_at_p(copyRecordHandle, _contacts_contact.image, i, &tempHandle); contacts_record_get_str(tempHandle, _contacts_image.path, &pCharValue); tempPath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/temp"; - tempPath.Append(i); + tempPath.Append((int)i); tempPath.Append(L".jpg"); String servicePath(pCharValue); @@ -571,10 +571,10 @@ _AddressbookManagerImpl::UpdateContact(const Contact& contact) ret = contacts_db_replace_record(copyRecordHandle, contactId); contacts_record_destroy(copyRecordHandle, true); - for (int i = 0; i < count; i++) + for (unsigned int i = 0; i < count; i++) { tempPath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/temp"; - tempPath.Append(i); + tempPath.Append((int)i); tempPath.Append(L".jpg"); File::Remove(tempPath); -- 2.7.4