Removed build warnings 53/106553/1
authorRahul Dadhich <r.dadhich@samsung.com>
Tue, 6 Dec 2016 10:19:56 +0000 (15:49 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Thu, 22 Dec 2016 05:18:33 +0000 (10:48 +0530)
Change-Id: I6a867ba8afe968a301f4711d9328d0c66beb38c1
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
src/util/gl-db-update.c
src/widget/gl-progressbar.c
widget/inc/gl_widget_debug.h

index a1d849686156ee4da0630939347ba2807ee9129b..5009ceb062b63bfd0d53f8087aaef301d431f067 100644 (file)
@@ -41,6 +41,7 @@ struct gl_db_noti_t {
        media_content_db_update_item_type_e update_item;
        media_content_db_update_type_e update_type;
        GList *uuids;
+       media_content_noti_h noti_handle;
 };
 
 static Eina_Bool __gl_db_update_idler(void *data)
@@ -150,21 +151,6 @@ static void __gl_db_update_cb(media_content_error_e error, int pid,
                          uuid, path, mime_type, data);
 }
 
-/*
-static void __gl_db_update_coud_cb(media_content_error_e error, int pid,
-                                  media_content_db_update_item_type_e update_item,
-                                  media_content_db_update_type_e update_type,
-                                  media_content_type_e media_type, char *uuid,
-                                  char *path, char *mime_type, void *data)
-{
-       gl_dbg("update_item[%d], update_type[%d], media_type[%d]", update_item,
-              update_type, media_type);
-       GL_CHECK(data);
-       __gl_db_update_op(error, pid, update_item, update_type, media_type,
-                         uuid, path, mime_type, data);
-}
-*/
-
 int _gl_db_update_add_timer(void *data)
 {
        GL_CHECK_VAL(data, -1);
@@ -252,15 +238,10 @@ bool _gl_db_update_reg_cb(void *data)
        int ret = -1;
 
        gl_dbg("Set db updated callback");
-       ret = media_content_set_db_updated_cb(__gl_db_update_cb, data);
+       ret = media_content_add_db_updated_cb(__gl_db_update_cb, data, &ad->db_noti_d->noti_handle);
        if (ret != MEDIA_CONTENT_ERROR_NONE) {
                gl_dbgE("Set db updated cb failed[%d]!", ret);
        }
-//     ret = media_content_set_db_updated_cloud_cb(&(ad->db_noti_d->cloud_h),
-//                                                 __gl_db_update_coud_cb,
-//                                                 data);
-//     if (ret != MEDIA_CONTENT_ERROR_NONE)
-//             gl_dbgE("Set db updated cloud cb failed[%d]!", ret);
        return true;
 }
 
@@ -282,22 +263,16 @@ bool _gl_db_update_finalize(void *data)
        int ret = -1;
        gl_dbg("Unset db updated callback");
 
-       ret = media_content_unset_db_updated_cb();
-       if (ret != MEDIA_CONTENT_ERROR_NONE) {
-               gl_dbgE("UNSet db updated cb failed[%d]!", ret);
-       }
-
        GL_CHECK_FALSE(data);
        gl_appdata *ad = (gl_appdata *)data;
        GL_CHECK_FALSE(ad->db_noti_d);
        gl_db_noti_s *db_noti = ad->db_noti_d;
 
-//     if (ad->db_noti_d->cloud_h) {
-//             ret = media_content_unset_db_updated_cloud_cb(ad->db_noti_d->cloud_h);
-//             if (ret != MEDIA_CONTENT_ERROR_NONE)
-//                     gl_dbgE("UNSet db updated cloud cb failed[%d]!", ret);
-//             ad->db_noti_d->cloud_h = NULL;
-//     }
+       ret = media_content_remove_db_updated_cb(db_noti->noti_handle);
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
+               gl_dbgE("UNSet db updated cb failed[%d]!", ret);
+       }
+
        if (db_noti->uuids) {
                g_list_free_full(db_noti->uuids, g_free);
                db_noti->uuids = NULL;
index 6c21695335f696e8af47dc4bb1c90528d476e28c..47a7e048abf7b1de877d2b8bccd783b02a08d409 100644 (file)
@@ -109,7 +109,6 @@ int gl_pb_make_thread_pbar(void *data, Evas_Object *parent, char *title)
        gl_appdata *ad = (gl_appdata *)data;
        Evas_Object *popup = NULL;
        Evas_Object *progressbar = NULL;
-       Evas_Object *box = NULL;
        Evas_Object *label = NULL;
 
        gl_pb_del_pbar(ad);
@@ -143,7 +142,7 @@ int gl_pb_make_thread_pbar(void *data, Evas_Object *parent, char *title)
 
        Evas_Object *layout = elm_layout_add(popup);
        char *path = _gl_get_edje_path();
-       GL_CHECK_NULL(path);
+       GL_CHECK_VAL(path, 0);
        elm_layout_file_set(layout, path, "popup_copy_move");
        free(path);
        evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
index 4c6faa14bc9fdfba137b145b2e66779619f11401..5c226a68c776b38a597181cbf17e620d078d464e 100644 (file)
 #ifndef GL_WIDGET_DEBUG_H
 #define GL_WIDGET_DEBUG_H
 
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
 #define LOG_TAG "GALLERY_WIDGET_APP"
 
 #if !defined(FLOG)
@@ -30,7 +34,6 @@ extern FILE *__file_log_fp;
 #define WarnPrint(format, arg...) do { fprintf(__file_log_fp, "[WRN] [\e[32m%s/%s\e[0m:%d] " format, util_basename(__FILE__), __func__, __LINE__, ##arg); fflush(__file_log_fp); } while (0)
 #endif
 
-// DbgPrint("FREE\n");
 #define DbgFree(a) do { \
        free(a); \
 } while (0)