From: seungha.son Date: Wed, 11 Jan 2017 06:23:05 +0000 (+0900) Subject: Modified type definitions X-Git-Tag: accepted/tizen/3.0/common/20170113.181937~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e95345e417dc81a504a7f87e498b5c2b31ceb51;p=platform%2Fcore%2Fapi%2Fnotification.git Modified type definitions - This can cause pointers to be assigned to int and vice-versa. But on a 64-bit system, assigning a pointer to an int causes the truncation of the high-order 32-bits. Signed-off-by: seungha.son Change-Id: I7d8c1e122af1b4c8a88cc8d1de9e4eaa898f9dec --- diff --git a/src/notification_setting.c b/src/notification_setting.c index aa2df98..8e82987 100755 --- a/src/notification_setting.c +++ b/src/notification_setting.c @@ -866,7 +866,7 @@ static gint _dnd_allow_exception_compare(gconstpointer a, gconstpointer b) dnd_allow_exception_data_a = (dnd_allow_exception_h)a; - if (dnd_allow_exception_data_a->type == (int)b) + if (dnd_allow_exception_data_a->type == GPOINTER_TO_INT(b)) return 0; return -1; @@ -882,7 +882,7 @@ EXPORT_API int notification_system_setting_get_dnd_allow_exceptions(notification return NOTIFICATION_ERROR_INVALID_PARAMETER; } - list = g_list_find_custom(system_setting->dnd_allow_exceptions, (gconstpointer)type, (GCompareFunc)_dnd_allow_exception_compare); + list = g_list_find_custom(system_setting->dnd_allow_exceptions, GINT_TO_POINTER(type), (GCompareFunc)_dnd_allow_exception_compare); if (list) { dnd_allow_exception_data = (dnd_allow_exception_h)list->data; *value = dnd_allow_exception_data->value; @@ -905,7 +905,7 @@ EXPORT_API int notification_system_setting_set_dnd_allow_exceptions(notification } list = g_list_first(system_setting->dnd_allow_exceptions); - list = g_list_find_custom(list, (gconstpointer)type, (GCompareFunc)_dnd_allow_exception_compare); + list = g_list_find_custom(list, GINT_TO_POINTER(type), (GCompareFunc)_dnd_allow_exception_compare); if (list) { dnd_allow_exception_data = (dnd_allow_exception_h)list->data;