From: Jongkyu Koo Date: Thu, 9 Feb 2017 00:23:31 +0000 (+0900) Subject: fix build warning X-Git-Tag: accepted/tizen/common/20170216.094245~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=880bc2b6d449814b95a816d8d3dbad4fa2b0730a;p=platform%2Fcore%2Fpim%2Fcontacts-service.git fix build warning Change-Id: Id63c434102dcd73ae232b5f233942c6622f1b4b7 Signed-off-by: Jongkyu Koo --- diff --git a/common/ctsvc_inotify.c b/common/ctsvc_inotify.c index 4e05c36..cbe59ca 100644 --- a/common/ctsvc_inotify.c +++ b/common/ctsvc_inotify.c @@ -581,7 +581,7 @@ void ctsvc_inotify_close(void) } } -static const char* __ctsvc_inotify_get_username(uid_t uid) +static char* __ctsvc_inotify_get_username(uid_t uid) { struct passwd pwd; struct passwd *pwd_result; @@ -605,7 +605,7 @@ char* ctsvc_inotify_makepath(const char *file) int path_len = 0; char *path = NULL; uid_t uid = getuid(); - const char *user_name = NULL; + char *user_name = NULL; #ifdef _CONTACTS_IPC_CLIENT if (ctsvc_client_is_in_system_session()) { diff --git a/common/ctsvc_vcard.c b/common/ctsvc_vcard.c index 41bf611..d093411 100644 --- a/common/ctsvc_vcard.c +++ b/common/ctsvc_vcard.c @@ -25,6 +25,7 @@ #include #include #include +#include #ifdef _CONTACTS_IPC_CLIENT #include "ctsvc_client_ipc.h" @@ -4439,8 +4440,7 @@ EXPORT_API int contacts_vcard_parse_to_contacts(const char *vcard_stream, contac static int _ctsvc_safe_add(unsigned int* total, unsigned int value) { - const unsigned int unsigned_int_max = 4294967295; - if (unsigned_int_max -*total < value) { + if (UINT_MAX -*total < value) { ERR("overflow occurs when %d + %d", *total, value); return CONTACTS_ERROR_SYSTEM; }