Fix the Svace issue 28/74728/2 submit/mobile/20160616.013505
authorHyuk Lee <hyuk0512.lee@samsung.com>
Wed, 15 Jun 2016 09:45:31 +0000 (18:45 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Wed, 15 Jun 2016 09:48:09 +0000 (18:48 +0900)
- WGID : 84586, 84620 (unreachable code)
- WGID : 99890 (do not assign addr of local to global)

Change-Id: I0466619e1d10dfe1f70afeeb196bebc6702f0294
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
src/bt-share-ui-main.c
src/bt-share-ui-view.c

index 7e29b99..4f86fd3 100644 (file)
@@ -49,6 +49,7 @@
 #include <bundle_internal.h>
 
 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);
        }
index 6a356c1..470e4fc 100755 (executable)
@@ -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;