Fix build warnings 97/130097/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Fri, 19 May 2017 06:28:28 +0000 (15:28 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Fri, 19 May 2017 06:29:00 +0000 (15:29 +0900)
Change-Id: I69d8e35c1f84036a47ace26a17a9ea02be0c1bde

src/option.cpp
src/sdk/cji.h
src/sdk/sdk.cpp

index b65a7cb..76e9835 100644 (file)
@@ -592,23 +592,28 @@ static Evas_Object *_main_radio_gl_content_get(void *data, Evas_Object *obj, con
             switch (item_data->mode) {
                 case SETTING_ITEM_ID_AUTO_CAPITALISE:
                     ck = _create_check_button(obj, g_config_values.auto_capitalise);
-                    evas_object_smart_callback_add(ck, "changed", check_autocapitalise_change_callback, (void*)(item_data->mode));
+                    evas_object_smart_callback_add(ck, "changed", check_autocapitalise_change_callback,
+                        reinterpret_cast<void*>(item_data->mode));
                     break;
                 case SETTING_ITEM_ID_AUTO_PUNCTUATE:
                     ck = _create_check_button(obj, g_config_values.auto_punctuate);
-                    evas_object_smart_callback_add(ck, "changed", check_autopunctuate_change_callback, (void*)(item_data->mode));
+                    evas_object_smart_callback_add(ck, "changed", check_autopunctuate_change_callback,
+                        reinterpret_cast<void*>(item_data->mode));
                     break;
                 case SETTING_ITEM_ID_SOUND:
                     ck = _create_check_button(obj, g_config_values.sound_on);
-                    evas_object_smart_callback_add(ck, "changed", check_sound_change_callback, (void*)(item_data->mode));
+                    evas_object_smart_callback_add(ck, "changed", check_sound_change_callback,
+                        reinterpret_cast<void*>(item_data->mode));
                     break;
                 case SETTING_ITEM_ID_VIBRATION:
                     ck = _create_check_button(obj, g_config_values.vibration_on);
-                    evas_object_smart_callback_add(ck, "changed", check_vibration_change_callback, (void*)(item_data->mode));
+                    evas_object_smart_callback_add(ck, "changed", check_vibration_change_callback,
+                        reinterpret_cast<void*>(item_data->mode));
                     break;
                 case SETTING_ITEM_ID_CHARACTER_PRE:
                     ck = _create_check_button(obj, g_config_values.preview_on);
-                    evas_object_smart_callback_add(ck, "changed", check_character_pre_change_callback, (void*)(item_data->mode));
+                    evas_object_smart_callback_add(ck, "changed", check_character_pre_change_callback,
+                        reinterpret_cast<void*>(item_data->mode));
                     break;
             }
 
@@ -980,7 +985,7 @@ static Evas_Object* create_option_language_view(Evas_Object *naviframe)
                 option_elements[type].language_item[loop] =
                     elm_genlist_item_append(genlist, option_elements[type].itc_language_subitems,
                             &language_itemdata[loop], NULL, ELM_GENLIST_ITEM_NONE,
-                            _language_gl_sel, (void*)(language_itemdata[loop].mode));
+                            _language_gl_sel, reinterpret_cast<void*>(language_itemdata[loop].mode));
 
                 language_itemdata[loop].item = option_elements[type].language_item[loop];
             } else {
index e41bf7b..7f803f5 100644 (file)
@@ -512,6 +512,12 @@ extern "C"{
 
 
     typedef struct makecodeinfo {
+        makecodeinfo() : size(0), cho_idx(0), jung_idx(0), jong_idx(0), next_cho_idx(0)
+        {
+            for (int loop = 0; loop < 2; loop++) {
+                ucode[loop] = 0;
+            }
+        }
         int size; // 조합중인 코드의 크기 (자음 + 천(.) 이나 자음 + 천천(..) 은 2, 나머지는 1)
         short ucode[2]; // 조합중인 글자의 유니코드 값
         short cho_idx;
@@ -522,6 +528,12 @@ extern "C"{
 
 
     typedef struct madecodeinfo {
+        madecodeinfo() : size(0)
+        {
+            for (int loop = 0; loop < 2; loop++) {
+                ucode[loop] = 0;
+            }
+        }
         int size; // 조합 완료된 코드의 크기 (자음 + 천(.) 이나 자음 + 천천(..) 은 2, 나머지는 1, 조합완료된 코드가 없는 경우 0)
         short ucode[2]; // 조합중인 글자의 유니코드 값
     } MADECODE;
index 6837cdb..d813d9e 100644 (file)
@@ -162,8 +162,8 @@ int iconv_string(const char *from, const char *to, const char *src, char *dst, s
 
 int process_korean_automata(int is_consonant, unsigned short key_index, bool skip_commit = false)
 {
-    MADECODE madecode = {0};
-    MAKECODE makecode = { 0 };
+    MADECODE madecode;
+    MAKECODE makecode;
     char buffer[KOREAN_ENCODING_BUFFER_SIZE] = { 0 };
 
     makecode = CJI_GetMakeCode();