Fixed warnings 31/66131/1 accepted/tizen/common/20160415.162717 accepted/tizen/ivi/20160418.012331 accepted/tizen/mobile/20160418.012359 accepted/tizen/tv/20160418.012316 accepted/tizen/wearable/20160418.012323 submit/tizen/20160415.100340
authorJinWang An <jinwang.an@samsung.com>
Fri, 15 Apr 2016 09:55:28 +0000 (18:55 +0900)
committerJinWang An <jinwang.an@samsung.com>
Fri, 15 Apr 2016 09:55:28 +0000 (18:55 +0900)
Change-Id: Icd8b5331666357a6e31b2ef621e475f1ab5b83e7
Signed-off-by: JinWang An <jinwang.an@samsung.com>
src/system_setting_platform.c
src/system_settings.c

index fb7f2c2..a37a9da 100644 (file)
@@ -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)
index 1ad039e..7a9d9d3 100644 (file)
@@ -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)
 {