From ea3eb7cbeb1393f79a5a6f6ee8fe36a9ba0e44f3 Mon Sep 17 00:00:00 2001 From: hyunuktak Date: Tue, 15 Mar 2016 17:17:29 +0900 Subject: [PATCH] Removed build warnings and deprecated function Change-Id: Ideeeaaab93792ce3637642424dad711baf7d7981 Signed-off-by: hyunuktak --- CMakeLists.txt | 2 +- packaging/wifi-efl-ug.spec | 2 +- sources/libraries/Common/common_eap_connect.c | 6 +- sources/ui-gadget/include/viewer_manager.h | 1 - sources/ui-gadget/viewers-layout/viewer_manager.c | 109 --------------------- .../ui-gadget/viewers-layout/wifi_viewer_list.c | 12 --- 6 files changed, 4 insertions(+), 128 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91618e2..4b9853e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ SET(ENGINE_PKGCONFIGS capi-network-wifi network) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations") IF(TIZEN_TETHERING_ENABLE) ADD_DEFINITIONS(-DTIZEN_TETHERING_ENABLE) diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index bfd4f60..8a2f782 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -1,7 +1,7 @@ %define _unpackaged_files_terminate_build 0 Name: wifi-efl-ug Summary: Wi-Fi UI Gadget for TIZEN -Version: 1.0.162 +Version: 1.0.163 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/sources/libraries/Common/common_eap_connect.c b/sources/libraries/Common/common_eap_connect.c index d0bb95b..4c98448 100755 --- a/sources/libraries/Common/common_eap_connect.c +++ b/sources/libraries/Common/common_eap_connect.c @@ -342,7 +342,6 @@ static void _gl_eap_type_sub_sel(void *data, Evas_Object *obj, void *event_info) elm_genlist_item_update(eap_data->eap_type_item); } -static CertSvcStringList stringList; static CertSvcInstance instance; static CertSvcStoreCertList *certList = NULL; @@ -398,8 +397,7 @@ static void _gl_eap_user_cert_sel(void *data, Evas_Object *obj, static void _create_eap_cert_list(eap_connect_data_t *eap_data, Evas_Object *btn) { - int list_length = 0; - int index = 0; + size_t list_length = 0; Evas_Object *ctxpopup; Elm_Object_Item *it = NULL; @@ -1195,7 +1193,7 @@ static gboolean __cert_extract_files(const char *cert_alias, { int ret; int validity; - int cert_counts = 0; + size_t cert_counts = 0; int cert_index; gchar *ca_cert_path = NULL; gchar *user_cert_path = NULL; diff --git a/sources/ui-gadget/include/viewer_manager.h b/sources/ui-gadget/include/viewer_manager.h index e0eafa8..50155c2 100755 --- a/sources/ui-gadget/include/viewer_manager.h +++ b/sources/ui-gadget/include/viewer_manager.h @@ -91,7 +91,6 @@ Evas_Object *viewer_manager_create_bg(Evas_Object *parent, char *style); #endif void viewer_manager_update_hidden_btn(void); int viewer_manager_create_scan_btn(void); -void viewer_manager_setup_wizard_btns_color_set(bool state); void viewer_manager_eap_view_deref(void); #ifdef __cplusplus diff --git a/sources/ui-gadget/viewers-layout/viewer_manager.c b/sources/ui-gadget/viewers-layout/viewer_manager.c index 308dda1..ed19426 100755 --- a/sources/ui-gadget/viewers-layout/viewer_manager.c +++ b/sources/ui-gadget/viewers-layout/viewer_manager.c @@ -80,7 +80,6 @@ static GList *wifi_device_list = NULL; static Eina_Bool rotate_flag = EINA_FALSE; static bool show_more = TRUE; -static bool is_on_color_set = FALSE; static void _hidden_button_callback(void* data, Evas_Object* obj, void* event_info); static void viewer_manager_hidden_confirm_cleanup(void); @@ -768,107 +767,6 @@ static void _hidden_button_callback(void* data, Evas_Object* obj, void* event_in __COMMON_FUNC_EXIT__; } -void viewer_manager_setup_wizard_btns_color_set(bool state) -{ - Evas_Object *layout = NULL; - Evas_Object *ly = NULL; - Elm_Object_Item *navi_it = NULL; - - navi_it = elm_naviframe_top_item_get(manager_object->nav); - layout = elm_object_item_content_get(navi_it); - if (layout == NULL) { - ERROR_LOG(UG_NAME_NORMAL, "layout is NULL"); - return; - } - - ly = (Evas_Object *)elm_layout_edje_get(layout); - if (ly == NULL) { - ERROR_LOG(UG_NAME_NORMAL, "ly is NULL"); - return; - } - int item_r, item_g, item_b, item_a = 0; - int bg_r, bg_g, bg_b, bg_a = 0; - int item_banded_a, bg_banded_a = 0; - int i = 0; - int item_color[3] = {0,}; - Elm_Object_Item *item = NULL; - - if (state == TRUE && is_on_color_set == TRUE) { - return; - } - - item = elm_genlist_first_item_get(manager_object->list); - if (item == NULL) { - INFO_LOG(UG_NAME_NORMAL, "first item is NULL"); - return; - } - - const char *item_bg = edje_object_data_get( - (Evas_Object *)elm_object_item_edje_get(item), - "bg_color"); - const char *pers_bg = edje_object_data_get( - (Evas_Object *)elm_layout_edje_get(manager_object->list), - "personalized_color"); - - if (item_bg == NULL || pers_bg == NULL) { - ERROR_LOG(UG_NAME_NORMAL, "color is NULL"); - return; - } else { - INFO_LOG(UG_NAME_NORMAL, "item_bg-[%s] pers_bg-[%s]", - item_bg, pers_bg); - } - - edje_object_color_class_get( - (Evas_Object *)elm_object_item_edje_get(item), - item_bg, &item_r, &item_g, &item_b, &item_a, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - edje_object_color_class_get( - (Evas_Object *)elm_layout_edje_get(manager_object->list), - pers_bg, &bg_r, &bg_g, &bg_b, &bg_a, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - - if (state == TRUE && manager_object->sw_hidden_btn != NULL) { - edje_object_signal_emit(ly, "rect_bg_color_on", "elm"); - - for (i = 0; i < 5; i++) { - item_banded_a = 255 - (i+1)*10; - bg_banded_a = 255 - item_banded_a; - - if (i == 4) { - item_color[0] = ((item_r * item_banded_a) >> 8) + - ((bg_r * bg_banded_a) >> 8); - item_color[1] = ((item_g * item_banded_a) >> 8) + - ((bg_g * bg_banded_a) >> 8); - item_color[2] = ((item_b * item_banded_a) >> 8) + - ((bg_b * bg_banded_a) >> 8); - } - } - edje_object_color_class_set(ly, - "on_color", item_color[0], item_color[1], item_color[2], - 255, 255, 255, 255, 255, 255, 255, 255, 255); - - is_on_color_set = TRUE; - } else { - edje_object_signal_emit(ly, "rect_bg_color_off", "elm"); - - item_banded_a = 255 - (i+1)*10; - bg_banded_a = 255 - item_banded_a; - - item_color[0] = ((item_r * item_banded_a) >> 8) + - ((bg_r * bg_banded_a) >> 8); - item_color[1] = ((item_g * item_banded_a) >> 8) + - ((bg_g * bg_banded_a) >> 8); - item_color[2] = ((item_b * item_banded_a) >> 8) + - ((bg_b * bg_banded_a) >> 8); - - edje_object_color_class_set(ly, "off_color", - item_color[0], item_color[1], item_color[2], - 255, 255, 255, 255, 255, 255, 255, 255, 255); - is_on_color_set = FALSE; - } - INFO_LOG(UG_NAME_NORMAL, "Set button bg color [%d]", state); -} - static void __viewer_manager_hidden_button_create(Evas_Object *genlist) { __COMMON_FUNC_ENTER__; @@ -1181,9 +1079,6 @@ Evas_Object *viewer_manager_create(Evas_Object *_parent, Evas_Object *_win_main) evas_object_show(layout); elm_object_focus_set(layout, EINA_TRUE); - if (ug_app_state->ug_type == UG_VIEW_SETUP_WIZARD) { - viewer_manager_setup_wizard_btns_color_set(FALSE); - } __COMMON_FUNC_EXIT__; return layout; @@ -1233,7 +1128,6 @@ Eina_Bool viewer_manager_show(VIEWER_WINSETS winset) __viewer_manager_hidden_button_create(manager_object->list); __viewer_manager_setup_wizard_scan_btn_create( manager_object->list); - viewer_manager_setup_wizard_btns_color_set(TRUE); } break; @@ -1301,7 +1195,6 @@ Eina_Bool viewer_manager_hide(VIEWER_WINSETS winset) } if (ug_app_state->ug_type == UG_VIEW_SETUP_WIZARD) { - viewer_manager_setup_wizard_btns_color_set(FALSE); __viewer_manager_hidden_btn_del(); __viewer_manager_setup_wizard_scan_btn_del(); } @@ -1530,7 +1423,6 @@ void viewer_manager_header_mode_set(HEADER_MODES new_mode) manager_object->scan_button = NULL; } if (ug_app_state->ug_type == UG_VIEW_SETUP_WIZARD) { - viewer_manager_setup_wizard_btns_color_set(FALSE); __viewer_manager_hidden_btn_del(); __viewer_manager_setup_wizard_scan_btn_del(); } @@ -1857,7 +1749,6 @@ Eina_Bool viewer_manager_refresh(void) __viewer_manager_hidden_button_create(manager_object->list); __viewer_manager_setup_wizard_scan_btn_create( manager_object->list); - viewer_manager_setup_wizard_btns_color_set(TRUE); } if (WLAN_MANAGER_CONNECTING == state) { diff --git a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c index a79d0e3..04e4170 100755 --- a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c +++ b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c @@ -286,31 +286,19 @@ static void _gl_realized(void *data, Evas_Object *obj, void *event_info) elm_access_info_set(ao, ELM_ACCESS_TYPE, buf); elm_access_info_set(ao, ELM_ACCESS_STATE, sc(PACKAGE, I18N_TYPE_Wi_Fi_network_info)); } - - if (ug_app_state->ug_type == UG_VIEW_SETUP_WIZARD && - first_item_index == index) { - viewer_manager_setup_wizard_btns_color_set(TRUE); - } #else - Elm_Object_Item *item = (Elm_Object_Item *)event_info; Elm_Object_Item *first_item = viewer_list_get_first_item(); if (first_item == NULL) { return; } - int index = (int)elm_genlist_item_index_get(item); int first_item_index = (int)elm_genlist_item_index_get(first_item); if (first_item_index == -1) { int group_index = (int)elm_genlist_item_index_get(grouptitle); first_item_index = group_index + 1; } - - if (ug_app_state->ug_type == UG_VIEW_SETUP_WIZARD && - first_item_index == index) { - viewer_manager_setup_wizard_btns_color_set(TRUE); - } #endif } -- 2.7.4