From b57c8745c4c9f32a94619b383f16adb11c202ad4 Mon Sep 17 00:00:00 2001 From: Youngjae Shin Date: Thu, 7 Sep 2017 11:05:30 +0900 Subject: [PATCH] remove build warning Change-Id: Ib9f6ad363044601a04817943e24058778208ff09 --- client/ctsvc_client_activity_helper.c | 5 ----- client/ctsvc_client_group_helper.c | 5 ----- client/ctsvc_client_person_helper.c | 4 ---- client/ctsvc_client_phonelog_helper.c | 5 ----- client/ctsvc_client_utils.c | 6 ++++-- client/ctsvc_client_utils.h | 4 ++-- 6 files changed, 6 insertions(+), 23 deletions(-) diff --git a/client/ctsvc_client_activity_helper.c b/client/ctsvc_client_activity_helper.c index 35b68c9..f743336 100644 --- a/client/ctsvc_client_activity_helper.c +++ b/client/ctsvc_client_activity_helper.c @@ -25,11 +25,6 @@ #include "ctsvc_ipc_marshal.h" #include "ctsvc_client_ipc.h" -static const char CONTACTS_READ_PRIVILEGE_ID[] = "http://tizen.org/privilege/contact.read"; -static const char CONTACTS_WRITE_PRIVILEGE_ID[] = "http://tizen.org/privilege/contact.write"; -static const char PHONELOG_READ_PRIVILEGE_ID[] = "http://tizen.org/privilege/callhistory.read"; -static const char PHONELOG_WRITE_PRIVILEGE_ID[] = "http://tizen.org/privilege/callhistory.write"; - int ctsvc_client_activity_delete_by_contact_id(contacts_h contact, int contact_id) { diff --git a/client/ctsvc_client_group_helper.c b/client/ctsvc_client_group_helper.c index bd97121..57dd13f 100644 --- a/client/ctsvc_client_group_helper.c +++ b/client/ctsvc_client_group_helper.c @@ -25,11 +25,6 @@ #include "ctsvc_ipc_marshal.h" -static const char CONTACTS_READ_PRIVILEGE_ID[] = "http://tizen.org/privilege/contact.read"; -static const char CONTACTS_WRITE_PRIVILEGE_ID[] = "http://tizen.org/privilege/contact.write"; -static const char PHONELOG_READ_PRIVILEGE_ID[] = "http://tizen.org/privilege/callhistory.read"; -static const char PHONELOG_WRITE_PRIVILEGE_ID[] = "http://tizen.org/privilege/callhistory.write"; - int ctsvc_client_group_add_contact(contacts_h contact, int group_id, int contact_id) { int ret = CONTACTS_ERROR_NONE; diff --git a/client/ctsvc_client_person_helper.c b/client/ctsvc_client_person_helper.c index f124e81..e53b39e 100644 --- a/client/ctsvc_client_person_helper.c +++ b/client/ctsvc_client_person_helper.c @@ -24,10 +24,6 @@ #include "ctsvc_client_ipc.h" #include "ctsvc_ipc_marshal.h" -static const char CONTACTS_READ_PRIVILEGE_ID[] = "http://tizen.org/privilege/contact.read"; -static const char CONTACTS_WRITE_PRIVILEGE_ID[] = "http://tizen.org/privilege/contact.write"; -static const char PHONELOG_READ_PRIVILEGE_ID[] = "http://tizen.org/privilege/callhistory.read"; -static const char PHONELOG_WRITE_PRIVILEGE_ID[] = "http://tizen.org/privilege/callhistory.write"; int ctsvc_client_person_link_person(contacts_h contact, int base_person_id, int person_id) { diff --git a/client/ctsvc_client_phonelog_helper.c b/client/ctsvc_client_phonelog_helper.c index 9d64fdb..35f2bbc 100644 --- a/client/ctsvc_client_phonelog_helper.c +++ b/client/ctsvc_client_phonelog_helper.c @@ -26,11 +26,6 @@ #include "ctsvc_ipc_marshal.h" -static const char CONTACTS_READ_PRIVILEGE_ID[] = "http://tizen.org/privilege/contact.read"; -static const char CONTACTS_WRITE_PRIVILEGE_ID[] = "http://tizen.org/privilege/contact.write"; -static const char PHONELOG_READ_PRIVILEGE_ID[] = "http://tizen.org/privilege/callhistory.read"; -static const char PHONELOG_WRITE_PRIVILEGE_ID[] = "http://tizen.org/privilege/callhistory.write"; - int ctsvc_client_phone_log_reset_statistics(contacts_h contact) { #ifndef ENABLE_LOG_FEATURE diff --git a/client/ctsvc_client_utils.c b/client/ctsvc_client_utils.c index 1949f6b..3f7fda4 100644 --- a/client/ctsvc_client_utils.c +++ b/client/ctsvc_client_utils.c @@ -27,12 +27,14 @@ #define CTSVC_SYSTEM_SLICE "system.slice" -__attribute__ ((gnu_inline))inline unsigned int ctsvc_client_get_pid() +#define CTSVC_INLINE __attribute__ ((gnu_inline)) + +CTSVC_INLINE inline unsigned int ctsvc_client_get_pid() { return (unsigned int)getpid(); } -__attribute__ ((gnu_inline))inline unsigned int ctsvc_client_get_tid() +CTSVC_INLINE inline unsigned int ctsvc_client_get_tid() { return (unsigned int)syscall(SYS_gettid); } diff --git a/client/ctsvc_client_utils.h b/client/ctsvc_client_utils.h index 239ffeb..b8861f0 100644 --- a/client/ctsvc_client_utils.h +++ b/client/ctsvc_client_utils.h @@ -20,8 +20,8 @@ #ifndef __CTSVC_CLIENT_UTILS_H__ #define __CTSVC_CLIENT_UTILS_H__ -__attribute__ ((gnu_inline))unsigned int ctsvc_client_get_pid(); -__attribute__ ((gnu_inline))unsigned int ctsvc_client_get_tid(); +unsigned int ctsvc_client_get_pid(); +unsigned int ctsvc_client_get_tid(); bool ctsvc_client_is_in_system_session(); int ctsvc_client_get_active_uid(uid_t *uid); -- 2.7.4