diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2015-12-16 08:20:28 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2015-12-16 08:20:28 +0900 |
commit | 1288739a40f2278b700f98cc8708c763e07c6a93 (patch) | |
tree | bf4f06aeb4769396bf73d5540727eab8037374f0 | |
parent | 5b023e466efaab373086bb8ccf37534f1bfc5793 (diff) | |
download | aul-1-1288739a40f2278b700f98cc8708c763e07c6a93.tar.gz aul-1-1288739a40f2278b700f98cc8708c763e07c6a93.tar.bz2 aul-1-1288739a40f2278b700f98cc8708c763e07c6a93.zip |
Fix type castingsubmit/tizen/20151215.232329accepted/tizen/wearable/20151216.105619accepted/tizen/tv/20151216.105639accepted/tizen/mobile/20151216.105748
Change-Id: I7c775163e24cf91bff2e9baef24fdb144554f1e6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | am_daemon/amd_appinfo.c | 16 | ||||
-rw-r--r-- | am_daemon/amd_status.c | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/am_daemon/amd_appinfo.c b/am_daemon/amd_appinfo.c index 0f633a8f..293f7d67 100644 --- a/am_daemon/amd_appinfo.c +++ b/am_daemon/amd_appinfo.c @@ -132,7 +132,7 @@ static char *__convert_apptype(const char *type) static int __read_background_category(const char *category_name, void *user_data) { struct appinfo *c = user_data; - int category = (int)(c->val[_AI_BG_CATEGORY]); + int category = (intptr_t)(c->val[_AI_BG_CATEGORY]); if (!category_name) return 0; @@ -143,19 +143,19 @@ static int __read_background_category(const char *category_name, void *user_data } if (strncmp(category_name, "media", strlen("media")) == 0) - c->val[_AI_BG_CATEGORY] = (char *)(category | _BACKGROUND_CATEGORY_MEDIA); + c->val[_AI_BG_CATEGORY] = (char *)((intptr_t)(category | _BACKGROUND_CATEGORY_MEDIA)); else if (strncmp(category_name, "download", strlen("download")) == 0) - c->val[_AI_BG_CATEGORY] = (char *)(category | _BACKGROUND_CATEGORY_DOWNLOAD); + c->val[_AI_BG_CATEGORY] = (char *)((intptr_t)(category | _BACKGROUND_CATEGORY_DOWNLOAD)); else if (strncmp(category_name, "background-network", strlen("background-network")) == 0) - c->val[_AI_BG_CATEGORY] = (char *)(category | _BACKGROUND_CATEGORY_BACKGROUND_NETWORK); + c->val[_AI_BG_CATEGORY] = (char *)((intptr_t)(category | _BACKGROUND_CATEGORY_BACKGROUND_NETWORK)); else if (strncmp(category_name, "location", strlen("location")) == 0) - c->val[_AI_BG_CATEGORY] = (char *)(category | _BACKGROUND_CATEGORY_LOCATION); + c->val[_AI_BG_CATEGORY] = (char *)((intptr_t)(category | _BACKGROUND_CATEGORY_LOCATION)); else if (strncmp(category_name, "sensor", strlen("sensor")) == 0) - c->val[_AI_BG_CATEGORY] = (char *)(category | _BACKGROUND_CATEGORY_SENSOR); + c->val[_AI_BG_CATEGORY] = (char *)((intptr_t)(category | _BACKGROUND_CATEGORY_SENSOR)); else if (strncmp(category_name, "iot-communication", strlen("iot-communication")) == 0) - c->val[_AI_BG_CATEGORY] = (char *)(category | _BACKGROUND_CATEGORY_IOT_COMMUNICATION); + c->val[_AI_BG_CATEGORY] = (char *)((intptr_t)(category | _BACKGROUND_CATEGORY_IOT_COMMUNICATION)); else if (strncmp(category_name, "system", strlen("system")) == 0) - c->val[_AI_BG_CATEGORY] = (char *)(category | _BACKGROUND_CATEGORY_SYSTEM); + c->val[_AI_BG_CATEGORY] = (char *)((intptr_t)(category | _BACKGROUND_CATEGORY_SYSTEM)); return 0; } diff --git a/am_daemon/amd_status.c b/am_daemon/amd_status.c index c7ab0244..822aa5f7 100644 --- a/am_daemon/amd_status.c +++ b/am_daemon/amd_status.c @@ -401,7 +401,7 @@ void _status_find_service_apps(int pid, uid_t uid, enum app_status status, void svc_info_t = (app_status_info_t *)svc_list->data; if (svc_info_t) { ai = appinfo_find(uid, svc_info_t->appid); - bg_allowed = (int)appinfo_get_value(ai, AIT_BG_CATEGORY); + bg_allowed = (intptr_t)appinfo_get_value(ai, AIT_BG_CATEGORY); if (!bg_allowed) { send_event_to_svc_core(svc_info_t->pid); /* TODO: APIs should be prepared @@ -448,7 +448,7 @@ void _status_check_service_only(int pid, uid_t uid, void (*send_event_to_svc_cor appid = _status_app_get_appid_bypid(pid); if (appid) { ai = appinfo_find(uid, appid); - bg_allowed = (int)appinfo_get_value(ai, AIT_BG_CATEGORY); + bg_allowed = (intptr_t)appinfo_get_value(ai, AIT_BG_CATEGORY); if (!bg_allowed) { send_event_to_svc_core(pid); |