Fix issue that detected by static analysis tool
[platform/core/uifw/inputdelegator.git] / src / w-input-stt-voice.cpp
index 17524fa..2c2c23c 100755 (executable)
@@ -1743,6 +1743,44 @@ int is_lang_supported_by_stt(char lang[])
        return FALSE;
 }
 
+int init_voicedata(VoiceData *r_voicedata)
+{
+       VoiceData *voicedata = (VoiceData *)r_voicedata;
+       if (!voicedata) {
+               return FALSE;
+       }
+
+       voicedata->voicefw_state = 0;
+       voicedata->voicefw_handle = NULL;
+       voicedata->naviframe = NULL;
+       voicedata->layout_main = NULL;
+       voicedata->progressbar = NULL;
+       voicedata->scroller = NULL;
+       voicedata->main_entry = NULL;
+       voicedata->mic_button = NULL;
+       voicedata->state = STT_STATE_VAL_INIT;
+       voicedata->kbd_lang = NULL;
+       voicedata->start_timer = NULL;
+       voicedata->refresh_timer = NULL;
+       voicedata->progressbar_timer = NULL;
+       voicedata->textblock_timer = NULL;
+       voicedata->guide_text_timer = NULL;
+       voicedata->btn_disabling_timer = NULL;
+       voicedata->power_unlock_timer = NULL;
+
+       voicedata->stt_results.clear();
+       voicedata->partial_result = NULL;
+       voicedata->result_type = 0;
+       voicedata->disclaimer = 0;
+       voicedata->mo = NULL;
+       voicedata->sttfeedback = NULL;
+       voicedata->sttmanager = NULL;
+       voicedata->ieffect = NULL;
+       voicedata->effector = NULL;
+
+       return TRUE;
+}
+
 int init_voice(Evas_Object *parent, const char *lang, VoiceData *r_voicedata)
 {
        PRINTFUNC(DLOG_DEBUG, "[init_voice]");