From: Kiseok Chang Date: Fri, 4 Jan 2019 01:55:30 +0000 (+0900) Subject: Fix repoted errors from coverity X-Git-Tag: submit/tizen_4.0/20190104.015938^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_4.0;p=profile%2Fmobile%2Fapps%2Fnative%2Fsettings.git Fix repoted errors from coverity Change-Id: I1047a1410e4966ed0af6d80bc54e983571517222 Signed-off-by: Kiseok Chang --- diff --git a/setting-about/src/setting-about-main.c b/setting-about/src/setting-about-main.c index f2898862..a6333876 100755 --- a/setting-about/src/setting-about-main.c +++ b/setting-about/src/setting-about-main.c @@ -1462,7 +1462,7 @@ static int __generate_genlist(void *data) } /* 7. [UI] Device status: */ - (void)setting_create_Gendial_field_def(ad->md.genlist, + setting_create_Gendial_field_def(ad->md.genlist, &(ad->itc_1icon_1text_sub), __mouse_up_Gendial_list_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, 0, ITEM_NAME_STATUS, "Show phone number, network"\ diff --git a/setting-accessibility/src/setting-accessibility-main.c b/setting-accessibility/src/setting-accessibility-main.c index ed7b43aa..fc88892d 100644 --- a/setting-accessibility/src/setting-accessibility-main.c +++ b/setting-accessibility/src/setting-accessibility-main.c @@ -105,7 +105,7 @@ int setting_accessibility_main_generate_genlist(void *data) SettingAccessibility *ad = (SettingAccessibility *)data; Evas_Object *scroller = ad->md.genlist; - (void)setting_create_Gendial_field_titleItem(scroller, + setting_create_Gendial_field_titleItem(scroller, &(itc_group_item), _(DEVOPTION_STR_ACCESSIBILITY_VISION), NULL); diff --git a/setting-appmgr/src/setting-appmgr-runinfo.c b/setting-appmgr/src/setting-appmgr-runinfo.c index a2f1a640..ee80a38c 100755 --- a/setting-appmgr/src/setting-appmgr-runinfo.c +++ b/setting-appmgr/src/setting-appmgr-runinfo.c @@ -314,7 +314,7 @@ static int _get_pkg(SettingAppMgr *ad) static void _get_apps_list(SettingAppMgr *ad) { ret_if(!ad); - (void)package_info_foreach_app_from_package( + package_info_foreach_app_from_package( ad->selected_running_app.package_info, PACKAGE_INFO_ALLAPP, _app_in_package_info_cb, ad); } @@ -360,14 +360,14 @@ static bool _app_in_package_info_cb(package_info_app_component_type_e comp_type, return true; } sibling_info->id = strdup(app_id); - (void)app_info_get_icon(sibling_app_info, &sibling_info->icon); + app_info_get_icon(sibling_app_info, &sibling_info->icon); if (EINA_TRUE != ecore_file_exists(sibling_info->icon)) { free(sibling_info->icon); sibling_info->icon = get_application_default_icon(app_id); } - (void)app_info_get_label(sibling_app_info, &sibling_info->label); - (void)app_info_get_exec(sibling_app_info, &sibling_info->sub_text); + app_info_get_label(sibling_app_info, &sibling_info->label); + app_info_get_exec(sibling_app_info, &sibling_info->sub_text); sibling_info->ram_usage = get_process_ram_usage_mb(sibling_app_info); app->apps_in_package = eina_list_append(app->apps_in_package, diff --git a/setting-appmgr/src/setting-appmgr-utils.c b/setting-appmgr/src/setting-appmgr-utils.c index 1c02706d..cf51f6ec 100755 --- a/setting-appmgr/src/setting-appmgr-utils.c +++ b/setting-appmgr/src/setting-appmgr-utils.c @@ -210,26 +210,26 @@ void appmgr_utils_update_app_node(app_node *node, app_info_h app_info) char *label = NULL; ret_if(!node); - (void)app_info_get_app_id(app_info, &node->appid); - (void)app_info_get_package(app_info, &node->pkgid); - (void)app_info_get_label(app_info, &node->label); + app_info_get_app_id(app_info, &node->appid); + app_info_get_package(app_info, &node->pkgid); + app_info_get_label(app_info, &node->label); if (!node->label) { - (void)app_info_get_exec(app_info, &label); + app_info_get_exec(app_info, &label); if (label) { node->label = strdup(basename(label)); free(label); } } - (void)app_info_get_icon(app_info, &node->icon_path); + app_info_get_icon(app_info, &node->icon_path); if (EINA_TRUE != ecore_file_exists(node->icon_path)) { free(node->icon_path); node->icon_path = get_application_default_icon(node->appid); } - (void)app_info_is_enabled(app_info, &node->is_enabled); - (void)app_manager_is_running(node->appid, &node->is_running); + app_info_is_enabled(app_info, &node->is_enabled); + app_manager_is_running(node->appid, &node->is_running); node->ram_used = get_process_ram_usage_mb(app_info); } @@ -299,12 +299,12 @@ void appmgr_utils_update_package_node(package_node *node, int ret = 0; ret_if(!node); - (void)package_info_get_package(package_info, &node->pkgid); - (void)package_info_get_label(package_info, &node->label); - (void)package_info_is_preload_package(package_info, + package_info_get_package(package_info, &node->pkgid); + package_info_get_label(package_info, &node->label); + package_info_is_preload_package(package_info, &node->is_preloaded); /* try to find icon: */ - (void)package_info_get_icon(package_info, &node->icon_path); + package_info_get_icon(package_info, &node->icon_path); if (EINA_TRUE != ecore_file_exists(node->icon_path)) { free(node->icon_path); node->icon_path = NULL; diff --git a/setting-appmgr/src/setting-appmgr.c b/setting-appmgr/src/setting-appmgr.c index b9f136ba..a100b926 100755 --- a/setting-appmgr/src/setting-appmgr.c +++ b/setting-appmgr/src/setting-appmgr.c @@ -329,7 +329,7 @@ static void _app_mgr_ctx_event_cb(app_context_h app_context, if (!ad) return; - (void)app_context_get_app_id(app_context, &app_id); + app_context_get_app_id(app_context, &app_id); SETTING_TRACE_DEBUG("_app_mgr_ctx_event_cb: %d app: %s", event, app_id); diff --git a/setting-common/src/setting-common-draw-genlist.c b/setting-common/src/setting-common-draw-genlist.c index ccb997c0..68462f2e 100644 --- a/setting-common/src/setting-common-draw-genlist.c +++ b/setting-common/src/setting-common-draw-genlist.c @@ -627,7 +627,7 @@ char *__setting_phone_lang_get_by_pattern(const char *locale, / sizeof((bestPattern)[0])); int32_t best_pattern_len; - (void)i18n_udatepg_get_best_pattern(pattern_generator, customSkeleton, + i18n_udatepg_get_best_pattern(pattern_generator, customSkeleton, i18n_ustring_get_length(customSkeleton), bestPattern, bestPatternCapacity, &best_pattern_len); i18n_ustring_copy_au(bestPatternString, bestPattern); @@ -639,7 +639,7 @@ char *__setting_phone_lang_get_by_pattern(const char *locale, int32_t formattedCapacity = (int32_t) (sizeof(formatted) / sizeof((formatted)[0])); int32_t buf_size_needed; - (void)i18n_udate_format_date(formatter, date, formatted, + i18n_udate_format_date(formatter, date, formatted, formattedCapacity, NULL, &buf_size_needed); i18n_ustring_copy_au(formattedString, formatted); i18n_udate_destroy(formatter); diff --git a/setting-common/src/setting-common-draw-popup.c b/setting-common/src/setting-common-draw-popup.c index b4c26574..4d215229 100644 --- a/setting-common/src/setting-common-draw-popup.c +++ b/setting-common/src/setting-common-draw-popup.c @@ -191,7 +191,7 @@ static void _popup_lang_del_cb(void *data, Evas *e, Evas_Object *obj, { SETTING_TRACE_BEGIN; ret_if(!obj); - (void)vconf_ignore_key_changed(VCONFKEY_LANGSET, _popup_lang_change_cb); + vconf_ignore_key_changed(VCONFKEY_LANGSET, _popup_lang_change_cb); evas_object_data_set(obj, "title", NULL); evas_object_data_set(obj, "text0", NULL); evas_object_data_set(obj, "text", NULL); diff --git a/setting-display/src/setting-display-main.c b/setting-display/src/setting-display-main.c index 64ac16b3..ad465c79 100755 --- a/setting-display/src/setting-display-main.c +++ b/setting-display/src/setting-display-main.c @@ -548,7 +548,7 @@ static void _get_font_name_string(char *buff, int len_max) return; current_font_type_str = cur_font_get(); - (void)system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, + system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &value); current_font_size_str = get_font_size_str(value); snprintf(buff, NAME_MAX, "%s, %s", _(current_font_size_str), diff --git a/setting-display/src/setting-display.c b/setting-display/src/setting-display.c index c202d5c2..3d63d243 100644 --- a/setting-display/src/setting-display.c +++ b/setting-display/src/setting-display.c @@ -91,12 +91,12 @@ static bool _setting_display_app_create(void *data) setting_view_node_table_register(&setting_view_display_main, NULL); setting_view_create(&setting_view_display_main, display_ad); - (void)system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE, _system_setting_changed_cb, data); - (void)system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE, _system_setting_changed_cb, data); - (void)system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, + system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE, _system_setting_changed_cb, data); + system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE, _system_setting_changed_cb, data); + system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, _system_setting_changed_cb, data); - (void)system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, _system_setting_changed_cb, data); - (void)device_add_callback(DEVICE_CALLBACK_BATTERY_LEVEL, _device_changed_cb, data); + system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, _system_setting_changed_cb, data); + device_add_callback(DEVICE_CALLBACK_BATTERY_LEVEL, _device_changed_cb, data); evas_object_show(display_ad->md.window); @@ -109,11 +109,11 @@ static void _setting_display_app_terminate(void *data) SettingDisplay *ad = (SettingDisplay *)data; setting_retm_if((!data), "!data"); - (void)system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE); - (void)system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE); - (void)system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO); - (void)system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME); - (void)device_remove_callback(DEVICE_CALLBACK_BATTERY_LEVEL, _device_changed_cb); + system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_TYPE); + system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE); + system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO); + system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME); + device_remove_callback(DEVICE_CALLBACK_BATTERY_LEVEL, _device_changed_cb); setting_view_destroy(&setting_view_display_main, ad); diff --git a/setting-language-and-input/src/setting-display-language-view.c b/setting-language-and-input/src/setting-display-language-view.c index 38511e2f..3fb234e9 100644 --- a/setting-language-and-input/src/setting-display-language-view.c +++ b/setting-language-and-input/src/setting-display-language-view.c @@ -97,7 +97,7 @@ static int __set_dateformat(const char *region, bestPatternCapacity = (int32_t) (sizeof(bestPattern) / sizeof((bestPattern)[0])); int32_t best_pattern_len; - (void)i18n_udatepg_get_best_pattern(ad->pattern_generator, customSkeleton, + i18n_udatepg_get_best_pattern(ad->pattern_generator, customSkeleton, i18n_ustring_get_length(customSkeleton), bestPattern, bestPatternCapacity, &best_pattern_len); diff --git a/setting-network/src/setting-network-connection-create.c b/setting-network/src/setting-network-connection-create.c index 365d562c..bf19b082 100755 --- a/setting-network/src/setting-network-connection-create.c +++ b/setting-network/src/setting-network-connection-create.c @@ -1418,47 +1418,47 @@ static int __save_connection(void *data) con_info = s_info.sel_profile_h; } else { if (!safeStrCmp(ad->con_name, STR_SETTING_MMS_CONNECTIONS)) { - (void)connection_profile_create( + connection_profile_create( CONNECTION_PROFILE_TYPE_CELLULAR, _(profile_name), &con_info); - (void)connection_profile_set_cellular_service_type( + connection_profile_set_cellular_service_type( con_info, CONNECTION_CELLULAR_SERVICE_TYPE_MMS); } else if (!safeStrCmp(ad->con_name, "IDS_ST_BODY_INTERNET_CONNECTION")) { - (void)connection_profile_create( + connection_profile_create( CONNECTION_PROFILE_TYPE_CELLULAR, _(profile_name), &con_info); - (void)connection_profile_set_cellular_service_type( + connection_profile_set_cellular_service_type( con_info, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET); } else { /* need to change con_name */ /* FREE(ad->con_name); */ /* ad->con_name = strdup(acs_name); */ - (void)connection_profile_create( + connection_profile_create( CONNECTION_PROFILE_TYPE_CELLULAR, _(profile_name), &con_info); if (CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET == s_info.srvType) { /* Internet */ - (void)connection_profile_set_cellular_service_type( + connection_profile_set_cellular_service_type( con_info, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET); } else if (CONNECTION_CELLULAR_SERVICE_TYPE_MMS == s_info.srvType) { /* MMS */ - (void)connection_profile_set_cellular_service_type( + connection_profile_set_cellular_service_type( con_info, CONNECTION_CELLULAR_SERVICE_TYPE_MMS); } else { /* MMS + Internet(Together) */ - (void)connection_profile_set_cellular_service_type( + connection_profile_set_cellular_service_type( con_info, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET); - (void)connection_profile_create( + connection_profile_create( CONNECTION_PROFILE_TYPE_CELLULAR, _(profile_name), &con_info_2); - (void)connection_profile_set_cellular_service_type( + connection_profile_set_cellular_service_type( con_info_2, CONNECTION_CELLULAR_SERVICE_TYPE_MMS); SETTING_TRACE("con_info_2:%p", con_info_2); @@ -1474,9 +1474,9 @@ static int __save_connection(void *data) /* save access name */ SETTING_TRACE("acs_name:%s", acs_name); - (void)connection_profile_set_cellular_apn(con_info, acs_name); + connection_profile_set_cellular_apn(con_info, acs_name); if (con_info_2) - (void)connection_profile_set_cellular_apn(con_info_2, + connection_profile_set_cellular_apn(con_info_2, acs_name); FREE(acs_name); @@ -1486,10 +1486,10 @@ static int __save_connection(void *data) SETTING_TRACE("-----> radio button state: %d", elm_radio_value_get(s_info.chk_type)); - (void)connection_profile_set_cellular_auth_info(con_info, type, + connection_profile_set_cellular_auth_info(con_info, type, usr_name, pwd); if (con_info_2) - (void)connection_profile_set_cellular_auth_info(con_info_2, + connection_profile_set_cellular_auth_info(con_info_2, type, usr_name, pwd); /* save proxy addr */ @@ -1545,7 +1545,7 @@ static int __save_connection(void *data) == s_info.srvType)) { home = elm_entry_markup_to_utf8(s_info.data_hm_url->sub_desc); if (home == (char *)NULL) { - (void)connection_profile_set_cellular_home_url( + connection_profile_set_cellular_home_url( con_info, URL_HEAD); } else { if (!safeStrCmp(home, "")) { @@ -1553,8 +1553,7 @@ static int __save_connection(void *data) home = strdup(URL_HEAD); ret = SETTING_DNET_RETURN_NULL_HOMEURL; } - (void)connection_profile_set_cellular_home_url( - con_info, home); + connection_profile_set_cellular_home_url(con_info, home); } FREE(home); } @@ -1562,7 +1561,7 @@ static int __save_connection(void *data) if (con_info_2) { /* creating both internet + MMS */ home = elm_entry_markup_to_utf8(s_info.data_hm_url->sub_desc); if (home == (char *)NULL) { - (void)connection_profile_set_cellular_home_url( + connection_profile_set_cellular_home_url( con_info_2, URL_HEAD); } else { if (!safeStrCmp(home, "")) { @@ -1570,8 +1569,7 @@ static int __save_connection(void *data) home = strdup(URL_HEAD); ret = SETTING_DNET_RETURN_NULL_HOMEURL; } - (void)connection_profile_set_cellular_home_url( - con_info_2, home); + connection_profile_set_cellular_home_url(con_info_2, home); } FREE(home); } @@ -1588,8 +1586,7 @@ static int __save_connection(void *data) /* Add a new profile */ connection_cellular_service_type_e type = CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN; - (void)connection_profile_get_cellular_service_type(con_info, - &type); + connection_profile_get_cellular_service_type(con_info, &type); err = connection_add_profile(ad->connection, con_info); if (err != CONNECTION_ERROR_NONE) { @@ -1601,13 +1598,12 @@ static int __save_connection(void *data) return SETTING_DNET_RETURN_ERR; } - (void)connection_profile_destroy(con_info); + connection_profile_destroy(con_info); if (con_info_2) { /* just for MMS + internet */ connection_cellular_service_type_e type = CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN; - (void)connection_profile_get_cellular_service_type( - con_info_2, &type); + connection_profile_get_cellular_service_type(con_info_2, &type); /* Add a new profile */ err = connection_add_profile(ad->connection, con_info_2); @@ -1622,7 +1618,7 @@ static int __save_connection(void *data) 0, false, false, 0); return ret; } - (void)connection_profile_destroy(con_info_2); + connection_profile_destroy(con_info_2); } } else { diff --git a/setting-network/src/setting-network-main.c b/setting-network/src/setting-network-main.c index 19b43369..fc9a5f39 100755 --- a/setting-network/src/setting-network-main.c +++ b/setting-network/src/setting-network-main.c @@ -1013,9 +1013,7 @@ static void _use_packet_resp_cb(void *data, Evas_Object *obj, 1); if (s_info.popup_chk && elm_check_state_get( s_info.popup_chk)) { - (void)vconf_set_bool( - VCONFKEY_SETAPPL_MOBILE_DATA_ON_REMINDER, - 0); + vconf_set_bool(VCONFKEY_SETAPPL_MOBILE_DATA_ON_REMINDER, 0); } _activate_state_data_roaming(ad, true); @@ -1037,9 +1035,7 @@ static void _use_packet_resp_cb(void *data, Evas_Object *obj, 0); if (s_info.popup_chk && elm_check_state_get( s_info.popup_chk)) { - (void)vconf_set_bool( - VCONFKEY_SETAPPL_MOBILE_DATA_OFF_REMINDER, - 0); + vconf_set_bool(VCONFKEY_SETAPPL_MOBILE_DATA_OFF_REMINDER, 0); } _activate_state_data_roaming(ad, false); diff --git a/setting-network/src/setting-network-profile-delete.c b/setting-network/src/setting-network-profile-delete.c index ae04f20b..62370472 100755 --- a/setting-network/src/setting-network-profile-delete.c +++ b/setting-network/src/setting-network-profile-delete.c @@ -580,7 +580,7 @@ static void setting_network_profile_delete_click_softkey_delete_cb(void *data, ok_cnt++; if (is_default && first_valid_item) { first_profile_h = (connection_profile_h)(first_valid_item->belongs_to); - (void)connection_set_default_cellular_service_profile( + connection_set_default_cellular_service_profile( ad->connection, ad->profile_service_type, first_profile_h); diff --git a/setting-password/src/setting-password-normal.c b/setting-password/src/setting-password-normal.c index cb1b4b04..39bd5a3b 100644 --- a/setting-password/src/setting-password-normal.c +++ b/setting-password/src/setting-password-normal.c @@ -704,7 +704,9 @@ static void _warning_entry_added_byte_popup(SettingPassword *ad, static void _done_password(void *data) { ret_if(data == NULL); + SettingPassword *ad = (SettingPassword *)data; + ret_if(ad->ed_pw1 == NULL); SETTING_TRACE("ad->view_type:%d", ad->view_type); int ret = 0; diff --git a/setting-profile/src/setting-profile-common.c b/setting-profile/src/setting-profile-common.c index 59ef9518..0ba551fd 100755 --- a/setting-profile/src/setting-profile-common.c +++ b/setting-profile/src/setting-profile-common.c @@ -986,25 +986,25 @@ static int __listen_vconf_change(void *data) retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); /*Ints */ - (void)vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, __sound_vconf_change_cb, data); /*Bools */ - (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, + vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, __sound_vconf_change_cb, data); - (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, + vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, __sound_vconf_change_cb, data); - (void)vconf_notify_key_changed( + vconf_notify_key_changed( VCONFKEY_SETAPPL_VIBRATE_WHEN_RINGING_BOOL, __sound_vconf_change_cb, data); - (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, + vconf_notify_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, __sound_vconf_change_cb, data); - (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, + vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, __sound_vconf_change_cb, data); - (void)vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, + vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, __sound_vconf_change_cb, data); - /* (void)vconf_notify_key_changed(VCONFKEY_ISE_KEYSOUND, + /* vconf_notify_key_changed(VCONFKEY_ISE_KEYSOUND, * __sound_vconf_change_cb, data); */ return 0; @@ -1014,25 +1014,25 @@ static int __unlisten_vconf_change(void *data) { /* unused listen */ /*Ints */ - (void)vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, + vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, __sound_vconf_change_cb); /*Bools */ - (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, + vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, __sound_vconf_change_cb); - (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, + vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, __sound_vconf_change_cb); - (void)vconf_ignore_key_changed( + vconf_ignore_key_changed( VCONFKEY_SETAPPL_VIBRATE_WHEN_RINGING_BOOL, __sound_vconf_change_cb); - (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, + vconf_ignore_key_changed(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, __sound_vconf_change_cb); - (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, + vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, __sound_vconf_change_cb); - (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, + vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, __sound_vconf_change_cb); - /*(void)vconf_ignore_key_changed(VCONFKEY_ISE_KEYSOUND, + /*vconf_ignore_key_changed(VCONFKEY_ISE_KEYSOUND, * __sound_vconf_change_cb); */ return 0; diff --git a/setting-profile/src/setting-profile-sound-main.c b/setting-profile/src/setting-profile-sound-main.c index 33e9acb4..d9f9a2b0 100755 --- a/setting-profile/src/setting-profile-sound-main.c +++ b/setting-profile/src/setting-profile-sound-main.c @@ -752,7 +752,7 @@ static void _get_lite_main_list(void *data) if (sound_value == FALSE) mm_value = 0; - (void)app_get_id(&app_id); + app_get_id(&app_id); if (app_id && !strcmp(VOLUME_APP_NAME, app_id)) optional_txt = "IDS_ST_MBODY_RINGTONE"; @@ -1180,7 +1180,7 @@ static void _result_myfile_cb(app_control_h request, if (APP_CONTROL_RESULT_SUCCEEDED != result) return; - (void)app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, + app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &paths, &arr_len); if (!paths || arr_len == 0) return; @@ -1251,9 +1251,7 @@ static void _create_myfile_ug(SettingSoundData *ad, char *titleID) SETTING_DEFAULT_CALL_TONE_SDK, SETTING_DEFAULT_CALL_TONE); - } - - if (0 == safeStrCmp(ad->ringtone_type, "IDS_ST_BODY_NOTIFICATION")) { + } else if (0 == safeStrCmp(ad->ringtone_type, "IDS_ST_BODY_NOTIFICATION")) { pa_cur_ringtone = _prepare_ringtone_path( VCONFKEY_SETAPPL_NOTI_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION, diff --git a/setting-profile/src/setting-profile.c b/setting-profile/src/setting-profile.c index cdcc963c..982650b7 100644 --- a/setting-profile/src/setting-profile.c +++ b/setting-profile/src/setting-profile.c @@ -81,7 +81,7 @@ static void _setting_sound_app_resume(void *priv) &sound_value) < 0) sound_value = TRUE; - (void)sound_manager_get_volume(SOUND_TYPE_RINGTONE, &volume); + sound_manager_get_volume(SOUND_TYPE_RINGTONE, &volume); if (sound_value == FALSE) volume = 0; if (sound_data->data_call_volume @@ -91,7 +91,7 @@ static void _setting_sound_app_resume(void *priv) volume); } - (void)sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &volume); + sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &volume); if (sound_value == FALSE) volume = 0; if (sound_data->data_noti_volume @@ -101,7 +101,7 @@ static void _setting_sound_app_resume(void *priv) volume); } - (void)sound_manager_get_volume(SOUND_TYPE_MEDIA, &volume); + sound_manager_get_volume(SOUND_TYPE_MEDIA, &volume); if (sound_data->data_media_volume && sound_data->data_media_volume->eo_check) { sound_data->data_media_volume->chk_status = volume; @@ -109,7 +109,7 @@ static void _setting_sound_app_resume(void *priv) volume); } - (void)sound_manager_get_volume(SOUND_TYPE_SYSTEM, &volume); + sound_manager_get_volume(SOUND_TYPE_SYSTEM, &volume); if (sound_value == FALSE) volume = 0; if (sound_data->data_touch_volume diff --git a/setting-ringtone/src/setting-ringtone-main.c b/setting-ringtone/src/setting-ringtone-main.c index f8d8d439..0d3e50f6 100755 --- a/setting-ringtone/src/setting-ringtone-main.c +++ b/setting-ringtone/src/setting-ringtone-main.c @@ -482,18 +482,18 @@ static void _select_more_menu_add_item_cb(void *data, Evas_Object *ctxpopup, ret_if(ret != 0 || !music_chooser_handle); - (void)app_control_set_operation(music_chooser_handle, + app_control_set_operation(music_chooser_handle, APP_CONTROL_OPERATION_PICK); - (void)app_control_set_mime(music_chooser_handle, "audio/*"); - (void)app_control_set_app_id(music_chooser_handle, + app_control_set_mime(music_chooser_handle, "audio/*"); + app_control_set_app_id(music_chooser_handle, "org.tizen.music-chooser"); - (void)app_control_add_extra_data(music_chooser_handle, + app_control_add_extra_data(music_chooser_handle, APP_CONTROL_DATA_SELECTION_MODE, "single"); - (void)app_control_add_extra_data(music_chooser_handle, + app_control_add_extra_data(music_chooser_handle, APP_CONTROL_DATA_SELECTION_MODE, "single"); - (void)app_control_add_extra_data(music_chooser_handle, "request_type", + app_control_add_extra_data(music_chooser_handle, "request_type", "SelectRingtone"); ret = app_control_send_launch_request(music_chooser_handle, _music_chooser_appctl_reply_cb, diff --git a/setting-ringtone/src/setting-ringtone.c b/setting-ringtone/src/setting-ringtone.c index ac0b9e46..7c29d547 100644 --- a/setting-ringtone/src/setting-ringtone.c +++ b/setting-ringtone/src/setting-ringtone.c @@ -46,16 +46,16 @@ bool __parse_appctl_request(app_control_h service, void *priv) !app_control_get_caller(service, &caller_id) && !safeStrCmp("org.tizen.setting-profile", caller_id); - (void)app_control_get_extra_data(service, "show_notification", &show_notification); + app_control_get_extra_data(service, "show_notification", &show_notification); ad->show_notification = (show_notification && !safeStrCmp(show_notification, "true")); free(show_notification); show_notification = NULL; ad->default_substitution = NULL; - (void)app_control_get_extra_data(service, "default_substitution", + app_control_get_extra_data(service, "default_substitution", &ad->default_substitution); - (void)app_control_get_extra_data_array(service, APP_CONTROL_DATA_SELECTED, &paths, &paths_len); + app_control_get_extra_data_array(service, APP_CONTROL_DATA_SELECTED, &paths, &paths_len); if (paths_len > 0) ad->appctl_file_path = strndup(paths[0], PATH_MAX); else @@ -65,7 +65,7 @@ bool __parse_appctl_request(app_control_h service, void *priv) paths = NULL; paths_len = 0; - (void)app_control_get_extra_data_array(service, APP_CONTROL_DATA_PATH, &paths, &paths_len); + app_control_get_extra_data_array(service, APP_CONTROL_DATA_PATH, &paths, &paths_len); ad->appctl_dir_path = NULL; if (paths_len > 0) { /* This is the situation when someone has chosen one of diff --git a/setting-smartmanager/smartmanager-battery/src/smartmanager-battery.c b/setting-smartmanager/smartmanager-battery/src/smartmanager-battery.c index 7d1d2b7a..e52b7e84 100755 --- a/setting-smartmanager/smartmanager-battery/src/smartmanager-battery.c +++ b/setting-smartmanager/smartmanager-battery/src/smartmanager-battery.c @@ -87,9 +87,9 @@ static void _smartmgr_battery_app_terminate(void *data) static void _smartmgr_battery_app_pause(void *data) { retm_if(!data, "data=%p is Invalid", data); - (void)device_remove_callback(DEVICE_CALLBACK_BATTERY_CAPACITY, + device_remove_callback(DEVICE_CALLBACK_BATTERY_CAPACITY, _battery_changed_cb); - (void)device_remove_callback(DEVICE_CALLBACK_BATTERY_CHARGING, + device_remove_callback(DEVICE_CALLBACK_BATTERY_CHARGING, _battery_changed_cb); } @@ -99,9 +99,9 @@ static void _smartmgr_battery_app_resume(void *data) SmartMgrBattery *ad = data; retm_if(NULL == data, "data=%p is Invalid", data); - (void)device_add_callback(DEVICE_CALLBACK_BATTERY_CAPACITY, + device_add_callback(DEVICE_CALLBACK_BATTERY_CAPACITY, _battery_changed_cb, ad); - (void)device_add_callback(DEVICE_CALLBACK_BATTERY_CHARGING, + device_add_callback(DEVICE_CALLBACK_BATTERY_CHARGING, _battery_changed_cb, ad); _get_battery_info(ad); _free_battery_usage_details_list(ad); @@ -190,14 +190,14 @@ static void _get_battery_usage_details_list(SmartMgrBattery *ad) abort(); } - (void)context_history_list_get_current(list, &record); - (void)context_history_record_get_string(record, + context_history_list_get_current(list, &record); + context_history_record_get_string(record, CONTEXT_HISTORY_APP_ID, &app->appid); - (void)context_history_record_get_double(record, + context_history_record_get_double(record, CONTEXT_HISTORY_TOTAL_AMOUNT, &app->percent); /* Attribute not available officially: */ - (void)context_history_record_get_int(record, "UsedTime", + context_history_record_get_int(record, "UsedTime", &app->event_start_time); app_info_create(app->appid, &app_info); if (app_info) { @@ -213,10 +213,10 @@ static void _get_battery_usage_details_list(SmartMgrBattery *ad) package_manager_get_package_id_by_app_id(app->appid, &app->pkgid); ad->apps = eina_list_append(ad->apps, app); - (void)context_history_record_destroy(record); + context_history_record_destroy(record); record = NULL; app_info = NULL; - (void)context_history_list_move_next(list); + context_history_list_move_next(list); } cleanup: diff --git a/setting-smartmanager/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c b/setting-smartmanager/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c index 884abb87..da988251 100755 --- a/setting-smartmanager/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c +++ b/setting-smartmanager/smartmanager-data/src/smartmanager-data-usage-mobile-settings.c @@ -279,6 +279,7 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb(stc_error_e resul if (STC_ERROR_NONE != ret) { SETTING_TRACE_ERROR("stc_restriction_info_get_limit() error: %s", get_error_message(ret)); + free(subscriber_id); return STC_CALLBACK_CONTINUE; } @@ -286,6 +287,7 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb(stc_error_e resul if (STC_ERROR_NONE != ret) { SETTING_TRACE_ERROR("stc_restriction_info_get_warning_limit() error: %s", get_error_message(ret)); + free(subscriber_id); return STC_CALLBACK_CONTINUE; } @@ -314,6 +316,7 @@ static stc_callback_ret_e _get_and_unset_limit_restrictions_cb(stc_error_e resul return STC_CALLBACK_CONTINUE; } + stc_restriction_rule_destroy(rule); } free(subscriber_id); diff --git a/setting-smartmanager/smartmanager-data/src/smartmanager-data.c b/setting-smartmanager/smartmanager-data/src/smartmanager-data.c index e12a294b..05435c3e 100755 --- a/setting-smartmanager/smartmanager-data/src/smartmanager-data.c +++ b/setting-smartmanager/smartmanager-data/src/smartmanager-data.c @@ -300,7 +300,7 @@ static void _terminate_app(void *data) return; setting_view_destroy(ad->main_view, ad); - stc_deinitialize(&ad->stc); + stc_deinitialize(ad->stc); telephony_deinit(&ad->telephony_handles); _clear_all_stat_lists(ad); free(ad->subscriber_id_1); @@ -569,6 +569,7 @@ static stc_callback_ret_e _stc_stats_info_cb(stc_error_e result, free(subscriber_id); } + free(app_id); return STC_CALLBACK_CONTINUE; } @@ -654,7 +655,7 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, return STC_CALLBACK_CONTINUE; } - (void)stc_restriction_info_get_app_id(info, &app_id); + stc_restriction_info_get_app_id(info, &app_id); if (!app_id || (strcmp("TOTAL_DATACALL", app_id) && strcmp("TOTAL_WIFI", app_id))) { free(app_id); @@ -675,7 +676,7 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, return STC_CALLBACK_CONTINUE; } */ - (void)stc_restriction_info_get_iface_type(info, &iface_type); + stc_restriction_info_get_iface_type(info, &iface_type); SETTING_TRACE_DEBUG("Obtained iface: %d", iface_type); if (iface_type == STC_IFACE_DATACALL) { @@ -684,16 +685,16 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, if (STC_ERROR_NONE == ret) { SETTING_TRACE_DEBUG("Obtained Subscriber ID: %s", subscriber_id); if (compare_subscriber_ids(ad.subscriber_id_1, subscriber_id)) { - (void)stc_restriction_info_get_limit(info, + stc_restriction_info_get_limit(info, &(ad.sim_1_limits.limit)); - (void)stc_restriction_info_get_warning_limit(info, + stc_restriction_info_get_warning_limit(info, &(ad.sim_1_limits.warning)); ad.main_view_update_type = MV_UPDATE_SIM_1_WARN_N_LIMIT; } if (compare_subscriber_ids(ad.subscriber_id_2, subscriber_id)) { - (void)stc_restriction_info_get_limit(info, + stc_restriction_info_get_limit(info, &(ad.sim_2_limits.limit)); - (void)stc_restriction_info_get_warning_limit(info, + stc_restriction_info_get_warning_limit(info, &(ad.sim_2_limits.warning)); ad.main_view_update_type = MV_UPDATE_SIM_2_WARN_N_LIMIT; } @@ -706,9 +707,9 @@ static stc_callback_ret_e _get_restrictions_cb(stc_error_e result, } if (iface_type == STC_IFACE_WIFI) { - (void)stc_restriction_info_get_limit(info, + stc_restriction_info_get_limit(info, &(ad.wifi_limits.limit)); - (void)stc_restriction_info_get_warning_limit(info, + stc_restriction_info_get_warning_limit(info, &(ad.wifi_limits.warning)); ad.main_view_update_type = MV_UPDATE_WIFI_WARN_N_LIMIT; setting_view_update(ad.main_view, &ad); diff --git a/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c b/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c index 266e72ea..65c465a5 100755 --- a/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c +++ b/setting-smartmanager/smartmanager-data/src/smartmanager-utils.c @@ -97,6 +97,7 @@ static bool _create_stats_list(stc_h stc, stc_iface_type_e iface, if (ret != STC_ERROR_NONE) { SETTING_TRACE_ERROR("stc_stats_rule_set_time_interval() error: %s", get_error_message(ret)); + stc_stats_rule_destroy(rule); return true; } @@ -104,6 +105,7 @@ static bool _create_stats_list(stc_h stc, stc_iface_type_e iface, if (ret != STC_ERROR_NONE) { SETTING_TRACE_ERROR("stc_stats_rule_set_iface_type() error: %s", get_error_message(ret)); + stc_stats_rule_destroy(rule); return true; } @@ -112,6 +114,8 @@ static bool _create_stats_list(stc_h stc, stc_iface_type_e iface, if (ret != STC_ERROR_NONE) { SETTING_TRACE_ERROR("stc_get_stats() error: %s", get_error_message(ret)); + + stc_stats_rule_destroy(rule); if (STC_ERROR_IN_PROGRESS == ret) return false; return true; @@ -249,7 +253,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_app_id(rule, "TOTAL_DATACALL"); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_app_id() error: %s", get_error_message(ret)); return RESTRICTIONS_ERROR; @@ -257,7 +260,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_iface_type(rule, STC_IFACE_DATACALL); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_iface_type() error: %s", get_error_message(ret)); return RESTRICTIONS_ERROR; @@ -265,7 +267,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_subscriber_id(rule, subscriber_id); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_subscriber_id() error:"\ "%s", get_error_message(ret)); @@ -274,7 +275,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_limit(rule, limit); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_limit() error: %s", get_error_message(ret)); return RESTRICTIONS_ERROR; @@ -282,7 +282,6 @@ restrictions_result set_mobile_restriction_rule_parameters( ret = stc_restriction_rule_set_warning_limit(rule, warning_limit); if (STC_ERROR_NONE != ret) { - stc_restriction_rule_destroy(rule); SETTING_TRACE_ERROR("stc_restriction_rule_set_warning_limit() error: %s", get_error_message(ret)); return RESTRICTIONS_ERROR; @@ -307,10 +306,9 @@ restrictions_result set_mobile_limit_restrictions(stc_h stc_handle, return RESTRICTIONS_ERROR; } - result = set_mobile_restriction_rule_parameters(rule, subscriber_id, limit, - warning_limit); + result = set_mobile_restriction_rule_parameters(rule, subscriber_id, limit, warning_limit); if (RESTRICTIONS_OK != result) { - SETTING_TRACE_ERROR("set_restriction_rule_parameters() error"); + SETTING_TRACE_ERROR("set_mobile_restriction_rule_parameters() error"); stc_restriction_rule_destroy(rule); return result; } diff --git a/setting-storage/src/setting-storage-applications-utils.c b/setting-storage/src/setting-storage-applications-utils.c index 7c0187da..286012ba 100755 --- a/setting-storage/src/setting-storage-applications-utils.c +++ b/setting-storage/src/setting-storage-applications-utils.c @@ -225,6 +225,7 @@ void storage_apps_get_node_info(package_info_h handle, Node_Info *info) "pkgmgrinfo_pkginfo_get_icon() Fail(%s)", get_error_message(ret)); info->l_icon = appmgr_check_icon(value); + free(value); /* Get time of installed by icon path */ info->added_time = ecore_file_mod_time(info->l_icon);