From 01e3131230dbc148ae51298edd13754f34eae632 Mon Sep 17 00:00:00 2001 From: JinWang An Date: Fri, 15 Apr 2016 18:55:28 +0900 Subject: [PATCH] Fixed warnings Change-Id: Icd8b5331666357a6e31b2ef621e475f1ab5b83e7 Signed-off-by: JinWang An --- src/system_setting_platform.c | 15 +++++++-------- src/system_settings.c | 4 +++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/system_setting_platform.c b/src/system_setting_platform.c index fb7f2c2..a37a9da 100644 --- a/src/system_setting_platform.c +++ b/src/system_setting_platform.c @@ -92,6 +92,8 @@ static char *_get_default_font(); static bool font_config_set(char *font_name); static void font_config_set_notification(); +int _is_file_accessible(const char *path); +int __is_available_font(char *font_name); /** * VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR has a path of the ringtone file which user choose @@ -382,7 +384,7 @@ bool __is_supported_image_type_by_ext(char *file_path) if (!file_path) return false; int ret = false; - if (ret = regcomp(&fsm, PATH_EXT_CHECK_REG, REG_ICASE | REG_EXTENDED)) { + if ((ret = regcomp(&fsm, PATH_EXT_CHECK_REG, REG_ICASE | REG_EXTENDED))) { SETTING_TRACE("regular expresstion fail"); return 1; } @@ -863,7 +865,6 @@ int system_setting_set_lockscreen_app(system_settings_key_e key, system_setting_ int r = 0; pkgmgrinfo_appinfo_h handle; - char *apptype = NULL; r = pkgmgrinfo_appinfo_get_appinfo(vconf_value, &handle); if (r != PMINFO_R_OK) { SETTING_TRACE("*** pkginfo failed "); @@ -1105,7 +1106,6 @@ int __is_available_font(char *font_name) FcObjectSet *os = NULL; FcFontSet *fs = NULL; FcPattern *pat = NULL; - Eina_List *list = NULL; FcConfig *font_config = NULL; int ret = 0; @@ -1169,7 +1169,7 @@ int __is_available_font(char *font_name) /* I will set english as default family language. */ /* If there is no proper family language for current locale, */ /* we have to show the english family name. */ - if (!strcmp(lang, "en")) { + if (!strcmp((char*)lang, "en")) { family_result = (char *)family; } id++; @@ -1410,7 +1410,6 @@ static int __font_size_get() { SETTING_TRACE_BEGIN; int font_size = -1; - int err = -1; int vconf_value = -1; if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) { @@ -1453,7 +1452,7 @@ int system_setting_get_locale_country(system_settings_key_e key, system_setting_ /* parsing validation */ /* en_US.UTF-8 */ char arr[20]; - snprintf(arr, 20, vconf_value); + snprintf(arr, 20, "%s", vconf_value); arr[5] = '\0'; *value = strdup(arr); free(vconf_value); @@ -1504,7 +1503,7 @@ int system_setting_get_locale_language(system_settings_key_e key, system_setting /* parsing validation */ /* en_US.UTF-8 */ char arr[20]; - snprintf(arr, 20, vconf_value); + snprintf(arr, 20, "%s", vconf_value); arr[5] = '\0'; *value = strdup(arr); free(vconf_value); @@ -1552,7 +1551,7 @@ int system_setting_get_locale_timeformat_24hour(system_settings_key_e key, syste return SYSTEM_SETTINGS_ERROR_IO_ERROR; } - bool ret_value; + bool ret_value = true; if (vconf_value == VCONFKEY_TIME_FORMAT_12) ret_value = false; else if (vconf_value == VCONFKEY_TIME_FORMAT_24) diff --git a/src/system_settings.c b/src/system_settings.c index 1ad039e..7a9d9d3 100644 --- a/src/system_settings.c +++ b/src/system_settings.c @@ -330,13 +330,14 @@ system_setting_s system_setting_table[] = { } }; +#if 0 static void _dump_context() { int i; /*int max = SYSTEM_SETTINGS_MAX; */ int max = sizeof(system_setting_table) / sizeof(system_setting_s) - 1 ; - for (i = 0; i < 27; i++) { + for (i = 0; i < max; i++) { LOGE("[%s] system_setting_table[i].key = %d", __FUNCTION__, system_setting_table[i].key); LOGE("[%s] system_setting_table[i].data_type = %d", __FUNCTION__, system_setting_table[i].data_type); LOGE("[%s] system_setting_table[i].get_value_cb = %x", __FUNCTION__, system_setting_table[i].get_value_cb); @@ -347,6 +348,7 @@ static void _dump_context() LOGE("[%s] system_setting_table[i].changed_cb = %x", __FUNCTION__, system_setting_table[i].changed_cb); } } +#endif static int _dump_context_node(int key) { -- 2.7.4