From 13cc6d361b202021a43b527b7f9dea0c9e06224e Mon Sep 17 00:00:00 2001 From: Rahul Dadhich Date: Fri, 15 Apr 2016 17:01:13 +0530 Subject: [PATCH] Removed build warnings Change-Id: I842cc9fa67ba9ae8aba59b30a8c39f038c567991 Signed-off-by: Rahul Dadhich --- src/gallery-efl.c | 8 +++++--- src/view/ge-albums.c | 21 ++++++++++----------- src/view/ge-gridview.c | 3 ++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/gallery-efl.c b/src/gallery-efl.c index 2f8bc57..ed1f3d3 100644 --- a/src/gallery-efl.c +++ b/src/gallery-efl.c @@ -363,10 +363,12 @@ static int _ge_parse_param(ge_ugdata *ugd, app_control_h service) ge_sdbg("operation [%s]", operation); #ifdef FEATURE_SIZE_CHECK - int ret = app_control_get_extra_data(service, "http://tizen.org/appcontrol/data/total_size", &(ugd->limitsize)); + char *total_size = NULL; + int ret = app_control_get_extra_data(service, "http://tizen.org/appcontrol/data/total_size", &(total_size)); if (ret != APP_CONTROL_ERROR_NONE) { - //Test data - //ugd->limitsize = 2 * 1024 * 1024; + ugd->limitsize = atol(total_size); + } else { + ugd->limitsize = -1; } #endif diff --git a/src/view/ge-albums.c b/src/view/ge-albums.c index d2fea89..e26fd3c 100644 --- a/src/view/ge-albums.c +++ b/src/view/ge-albums.c @@ -993,8 +993,7 @@ __ge_check_state_changed_cb(void *data, Evas_Object *obj, void *ei) if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) { elm_check_state_set(obj, EINA_FALSE); char *pStrWarning = g_strdup_printf( - GE_STR_UNSUPPORTED_FILE, - NULL); + GE_STR_UNSUPPORTED_FILE); notification_status_message_post(pStrWarning); GE_FREE(pStrWarning); _ge_data_util_free_sel_item(sit); @@ -1002,8 +1001,9 @@ __ge_check_state_changed_cb(void *data, Evas_Object *obj, void *ei) } if ((ugd->max_count != -1) && (gitem->ugd->thumbs_d->tot_selected + 1 > ugd->max_count)) { elm_check_state_set(obj, EINA_FALSE); + char *noti_str = GE_STR_MAX_PICTURES_SELECTED; char *pStrWarning = g_strdup_printf( - GE_STR_MAX_PICTURES_SELECTED, + noti_str, ugd->max_count); notification_status_message_post(pStrWarning); GE_FREE(pStrWarning); @@ -1146,9 +1146,9 @@ __ge_gengrid_item_content_get(void *data, Evas_Object *obj, const char *part) return ck; } else if (!g_strcmp0(part, "sd_card_icon")) { - if (gitem->item->storage_type == GE_MMC) { + if (gitem->item->storage_type == (media_content_storage_e)GE_MMC) { icon = elm_icon_add(obj); - elm_icon_file_set(icon, sd_card_image_path, NULL); + elm_image_file_set(icon, sd_card_image_path, NULL); evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); return icon; } @@ -1171,7 +1171,7 @@ __ge_gallery_ug_result_cb(app_control_h request, app_control_h reply, app_contro int arrayLength = 0; int i = 0; - if ((result != APP_CONTROL_ERROR_NONE) || !reply) { + if ((result != APP_CONTROL_RESULT_SUCCEEDED) || !reply) { ge_dbgE("ug-gallery-efl data get failed."); return; } @@ -1251,7 +1251,7 @@ __ge_grid_select_one(ge_item *gitem, char *file_url) int ret = -1; if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) { - char *pStrWarning = g_strdup_printf(GE_STR_UNSUPPORTED_FILE, NULL); + char *pStrWarning = g_strdup_printf(GE_STR_UNSUPPORTED_FILE); notification_status_message_post(pStrWarning); GE_FREE(pStrWarning); return ret; @@ -1322,15 +1322,14 @@ __ge_gengrid_item_sel_cb(void *data, Evas_Object *obj, void *ei) if (bl == EINA_FALSE) { if (!g_strcmp0(gitem->item->thumb_url, DEFAULT_THUMBNAIL)) { char *pStrWarning = g_strdup_printf( - GE_STR_UNSUPPORTED_FILE, - NULL); + GE_STR_UNSUPPORTED_FILE); notification_status_message_post(pStrWarning); GE_FREE(pStrWarning); return; } if ((ugd->max_count != -1) && (gitem->ugd->thumbs_d->tot_selected + 1 > ugd->max_count)) { - char *pStrWarning = g_strdup_printf( - GE_STR_MAX_PICTURES_SELECTED, + char *noti_str = GE_STR_MAX_PICTURES_SELECTED; + char *pStrWarning = g_strdup_printf(noti_str, ugd->max_count); notification_status_message_post(pStrWarning); GE_FREE(pStrWarning); diff --git a/src/view/ge-gridview.c b/src/view/ge-gridview.c index 27e0841..67e055d 100644 --- a/src/view/ge-gridview.c +++ b/src/view/ge-gridview.c @@ -1004,7 +1004,8 @@ static void __ge_grid_done_cb(void *data, Evas_Object *obj, void *ei) sel_cnt = _ge_data_get_sel_cnt(ugd); if (ugd->max_count > 0 && sel_cnt > ugd->max_count) { char *noti = NULL; - noti = g_strdup_printf(GE_STR_MAXIMUM_COUNT, ugd->max_count); + char *noti_str = GE_STR_MAXIMUM_COUNT; + noti = g_strdup_printf(noti_str, ugd->max_count); _ge_ui_create_notiinfo(noti); GE_GFREEIF(noti); b_disabled = true; -- 2.7.4