From ddeb0db6c4d1ed4eba5c5a6f624ff9297ada3c6d Mon Sep 17 00:00:00 2001 From: Hyuk Lee Date: Wed, 15 Jun 2016 18:45:31 +0900 Subject: [PATCH] Fix the Svace issue - WGID : 84586, 84620 (unreachable code) - WGID : 99890 (do not assign addr of local to global) Change-Id: I0466619e1d10dfe1f70afeeb196bebc6702f0294 Signed-off-by: Hyuk Lee --- src/bt-share-ui-main.c | 8 ++++---- src/bt-share-ui-view.c | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/bt-share-ui-main.c b/src/bt-share-ui-main.c index 7e29b99..4f86fd3 100644 --- a/src/bt-share-ui-main.c +++ b/src/bt-share-ui-main.c @@ -49,6 +49,7 @@ #include bt_share_appdata_t *app_state = NULL; +bt_share_appdata_t app_data = {0,}; static void __bt_lang_changed_cb(app_event_info_h event_info, void *data) { @@ -353,8 +354,7 @@ EXPORT int main(int argc, char *argv[]) ui_app_lifecycle_callback_s callback = {0,}; app_event_handler_h lang_changed_handler; - bt_share_appdata_t ad = {0,}; - app_state = &ad; + app_state = &app_data; callback.create = __app_create; callback.terminate = __app_terminate; @@ -362,10 +362,10 @@ EXPORT int main(int argc, char *argv[]) callback.resume = __app_resume; callback.app_control = __app_service; - ui_app_add_event_handler(&lang_changed_handler, APP_EVENT_LANGUAGE_CHANGED, __bt_lang_changed_cb, &ad); + ui_app_add_event_handler(&lang_changed_handler, APP_EVENT_LANGUAGE_CHANGED, __bt_lang_changed_cb, &app_data); DBG("ui_app_main() is called."); - int ret = ui_app_main(argc, argv, &callback, &ad); + int ret = ui_app_main(argc, argv, &callback, &app_data); if (ret != APP_ERROR_NONE) { ERR("ui_app_main() is failed. err = %d", ret); } diff --git a/src/bt-share-ui-view.c b/src/bt-share-ui-view.c index 6a356c1..470e4fc 100755 --- a/src/bt-share-ui-view.c +++ b/src/bt-share-ui-view.c @@ -579,9 +579,10 @@ void _bt_update_tr_notification(void *data) list_traverse = notification_list_get_next(list_traverse); } - if (success == 0 && fail == 0) { + if (success == 0 && fail == 0) notification_delete_by_priv_id(app_id, NOTIFICATION_TYPE_NOTI, priv_id); - } else { +#if 0 + else { char str[BT_GLOBALIZATION_STR_LENGTH] = { 0 }; if (success == 1) { stms_str = BT_STR_TR_1FILE_COPIED_STATUS; @@ -595,7 +596,7 @@ void _bt_update_tr_notification(void *data) notification_set_content(noti, str, NULL); notification_update(noti); } - +#endif if (list_head != NULL) { notification_free_list(list_head); list_head = NULL; -- 2.7.4