From 48b3cfab3cc398b32fc57015506cf7017fc5af2b Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Mon, 18 Apr 2016 14:16:46 +0900 Subject: [PATCH] Fix build warnings Change-Id: I4bda2d539e040963213e6ff2c2b9f73bcd24dcdc Signed-off-by: Seonah Moon --- packaging/ug-setting-mobileap-efl.spec | 2 +- src/mh_func_onoff.c | 5 +++-- src/mh_popup.c | 3 ++- src/mh_view_main.c | 4 ++-- src/mh_view_wifi_setup.c | 9 ++++++--- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packaging/ug-setting-mobileap-efl.spec b/packaging/ug-setting-mobileap-efl.spec index 84399e9..8019128 100755 --- a/packaging/ug-setting-mobileap-efl.spec +++ b/packaging/ug-setting-mobileap-efl.spec @@ -3,7 +3,7 @@ Name: ug-setting-mobileap-efl Summary: Tethering UI Gadget Library -Version: 1.0.129 +Version: 1.0.130 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/src/mh_func_onoff.c b/src/mh_func_onoff.c index d56052f..0aa647a 100644 --- a/src/mh_func_onoff.c +++ b/src/mh_func_onoff.c @@ -293,7 +293,8 @@ int _create_wifi_hotspot_on_popup(mh_appdata_t *ad) int _create_bt_tethering_on_popup(mh_appdata_t *ad) { - char *str; + char *fmt = STR_TETH_ON_DESC_2; + char *str = NULL; int value = 0; value = _get_checkbox_status(TETHERING_TYPE_BT); if (0 == value) { @@ -302,7 +303,7 @@ int _create_bt_tethering_on_popup(mh_appdata_t *ad) ERR("memory allocation is failed\n"); return -1; } - snprintf(str, MH_LABEL_LENGTH_MAX, STR_TETH_ON_DESC_2, + snprintf(str, MH_LABEL_LENGTH_MAX, fmt, TETHERING_BT_MAX_CONNECTED_STA); _prepare_popup(MH_POPUP_BT_ON_CHECKBOX, str); g_free(str); diff --git a/src/mh_popup.c b/src/mh_popup.c index 8793aa8..6df4aca 100755 --- a/src/mh_popup.c +++ b/src/mh_popup.c @@ -322,7 +322,8 @@ static void __language_changed_cb(void *data, Evas_Object *obj, void *event_info break; case TETHERING_TYPE_BT: - snprintf(str, MH_LABEL_LENGTH_MAX, STR_TETH_ON_DESC_2, TETHERING_BT_MAX_CONNECTED_STA); + fmt = STR_TETH_ON_DESC_2; + snprintf(str, MH_LABEL_LENGTH_MAX, fmt, TETHERING_BT_MAX_CONNECTED_STA); break; case TETHERING_TYPE_USB: diff --git a/src/mh_view_main.c b/src/mh_view_main.c index 35893b8..fd7e6b8 100755 --- a/src/mh_view_main.c +++ b/src/mh_view_main.c @@ -758,7 +758,6 @@ static Evas_Object *__get_wifi_icon(void *data, Evas_Object *obj, { mh_appdata_t *ad = (mh_appdata_t*)data; Evas_Object *btn = NULL; - Evas_Object *icon_layout = NULL; if (data == NULL) { ERR("The param is NULL\n"); @@ -876,6 +875,7 @@ static char *__get_help_label(void *data, Evas_Object *obj, const char *part) char device_name[MH_LABEL_LENGTH_MAX] = {0, }; char passphrase[MH_LABEL_LENGTH_MAX] = {0, }; char security_type[MH_LABEL_LENGTH_MAX] = {0, }; + char *fmt = STR_SECURITY_TYPE_PS; char *hidden = ""; char *ptr = NULL; char *device_name_utf = NULL; @@ -917,7 +917,7 @@ static char *__get_help_label(void *data, Evas_Object *obj, const char *part) g_free(ptr); snprintf(security_type, sizeof(security_type), - STR_SECURITY_TYPE_PS, "WPA2 PSK"); + fmt, "WPA2 PSK"); } wifi_state = ad->main.hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI; diff --git a/src/mh_view_wifi_setup.c b/src/mh_view_wifi_setup.c index 143b156..a6295f0 100755 --- a/src/mh_view_wifi_setup.c +++ b/src/mh_view_wifi_setup.c @@ -342,9 +342,10 @@ static void __pw_entry_maxlength_reached_cb(void *data, Evas_Object *obj, return; } char buf[MH_LABEL_LENGTH_MAX] = { 0, }; + char *fmt = STR_PASSWORD_MIN_MAX; notification_error_e ret; - snprintf(buf, sizeof(buf), STR_PASSWORD_MIN_MAX, + snprintf(buf, sizeof(buf), fmt, WIFI_PASSPHRASE_LENGTH_MIN, WIFI_PASSPHRASE_LENGTH_MAX); ret = notification_status_message_post(buf); @@ -408,8 +409,9 @@ static void __pw_entry_language_changed_cb(void *data, Evas_Object *obj, void *e mh_appdata_t *ad = (mh_appdata_t *)data; mh_wifi_setting_view_t *st = &ad->setup; char buf[MH_LABEL_LENGTH_MAX]; + char *fmt = STR_PW_GUIDE_TEXT; - snprintf(buf, sizeof(buf), STR_PW_GUIDE_TEXT, WIFI_PASSPHRASE_LENGTH_MIN); + snprintf(buf, sizeof(buf), fmt, WIFI_PASSPHRASE_LENGTH_MIN); if (st->security_type_new == TETHERING_WIFI_SECURITY_TYPE_NONE) { if (st->pw_item) @@ -426,6 +428,7 @@ static Evas_Object *__get_pw_entry(void *data, Evas_Object *parent) static Elm_Entry_Filter_Limit_Size limit_filter_data; Evas_Object *entry = NULL; + char *fmt = STR_PW_GUIDE_TEXT; char *ptr = NULL; Evas_Object * clr_btn = NULL; char buf[MH_LABEL_LENGTH_MAX]; @@ -459,7 +462,7 @@ static Evas_Object *__get_pw_entry(void *data, Evas_Object *parent) elm_object_signal_emit(entry, "elm,action,hide,search_icon", ""); elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_PASSWORD); elm_entry_cursor_end_set(entry); - snprintf(buf, sizeof(buf), STR_PW_GUIDE_TEXT, WIFI_PASSPHRASE_LENGTH_MIN); + snprintf(buf, sizeof(buf), fmt, WIFI_PASSPHRASE_LENGTH_MIN); elm_object_part_text_set(entry, "elm.guide", buf); elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT); -- 2.7.4