From: seoz Date: Mon, 26 Mar 2012 23:46:53 +0000 (+0000) Subject: elm examples: Fixed some build warnings. X-Git-Tag: sbs/armel/slp2-target~36^2~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=374f8c0422dd933505baf7143178515fbc75c65b;p=framework%2Fuifw%2Felementary.git elm examples: Fixed some build warnings. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69642 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/examples/bubble_example_01.c b/src/examples/bubble_example_01.c index b601b85..0d3e546 100644 --- a/src/examples/bubble_example_01.c +++ b/src/examples/bubble_example_01.c @@ -11,7 +11,7 @@ static const char *corners[] = {"top_left", "top_right", void -_bla(void *data, Evas_Object *obj, void *event_info) +_bla(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) { static unsigned char corner = 0; ++corner; @@ -23,10 +23,9 @@ _bla(void *data, Evas_Object *obj, void *event_info) } EAPI_MAIN int -elm_main(int argc, char **argv) +elm_main(int argc __UNUSED__, char **argv __UNUSED__) { Evas_Object *win, *bg, *bubble, *label, *icon; - char buf[256]; win = elm_win_add(NULL, "bubble", ELM_WIN_BASIC); elm_win_title_set(win, "Bubble"); diff --git a/src/examples/button_example_00.c b/src/examples/button_example_00.c index cc69c28..51b9a54 100644 --- a/src/examples/button_example_00.c +++ b/src/examples/button_example_00.c @@ -9,7 +9,7 @@ #endif static void -on_click(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +on_click(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { elm_exit(); } diff --git a/src/examples/calendar_example_02.c b/src/examples/calendar_example_02.c index 0a0085b..9db3855 100644 --- a/src/examples/calendar_example_02.c +++ b/src/examples/calendar_example_02.c @@ -18,11 +18,11 @@ #endif static char * -_format_month_year(struct tm *stime) +_format_month_year(struct tm *format_time) { char buf[32]; /* abbreviates month and year */ - if (!strftime(buf, sizeof(buf), "%b %y", stime)) return NULL; + if (!strftime(buf, sizeof(buf), "%b %y", format_time)) return NULL; return strdup(buf); } diff --git a/src/examples/calendar_example_05.c b/src/examples/calendar_example_05.c index 0a676a8..9a2b702 100644 --- a/src/examples/calendar_example_05.c +++ b/src/examples/calendar_example_05.c @@ -22,10 +22,10 @@ _print_cal_info_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __U int year_min, year_max; Eina_Bool sel_enabled; const char **wds; - struct tm stime; + struct tm sel_time; double interval; - if (!elm_calendar_selected_time_get(obj, &stime)) + if (!elm_calendar_selected_time_get(obj, &sel_time)) return; interval = elm_calendar_interval_get(obj); @@ -36,7 +36,7 @@ _print_cal_info_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __U printf("Day: %i, Mon: %i, Year %i, WeekDay: %i
\n" "Interval: %0.2f, Year_Min: %i, Year_Max %i, Sel Enabled : %i
\n" "Weekdays: %s, %s, %s, %s, %s, %s, %s
\n\n", - stime.tm_mday, stime.tm_mon, stime.tm_year + 1900, stime.tm_wday, + sel_time.tm_mday, sel_time.tm_mon, sel_time.tm_year + 1900, sel_time.tm_wday, interval, year_min, year_max, sel_enabled, wds[0], wds[1], wds[2], wds[3], wds[4], wds[5], wds[6]); } diff --git a/src/examples/check_example_01.c b/src/examples/check_example_01.c index cec2096..84e5923 100644 --- a/src/examples/check_example_01.c +++ b/src/examples/check_example_01.c @@ -9,11 +9,10 @@ static void _print(void *data, Evas_Object *obj, void *event_info); EAPI_MAIN int -elm_main(int argc, char **argv) +elm_main(int argc __UNUSED__, char **argv __UNUSED__) { Evas_Object *win, *bg, *cb, *cb2, *icon; Eina_Bool value; - char buf[256]; win = elm_win_add(NULL, "check", ELM_WIN_BASIC); elm_win_title_set(win, "Check"); @@ -57,7 +56,7 @@ elm_main(int argc, char **argv) ELM_MAIN() static void -_print(void *data, Evas_Object *obj, void *event_info) +_print(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { printf("check %smarked\n", *((Eina_Bool*)data) ? "" : "un"); } diff --git a/src/examples/entry_example.c b/src/examples/entry_example.c index 64842c2..a3ab9c9 100644 --- a/src/examples/entry_example.c +++ b/src/examples/entry_example.c @@ -78,15 +78,12 @@ _page_grid_add(Evas_Object *parent, App_Inwin_Data *aid) Evas_Object *grid; char *theme, *emo; Eina_List *emos, *it; - static Elm_Gengrid_Item_Class it_class = { - "default", - { - _emo_label_get, - _emo_content_get, - NULL, - _emo_del - } - }; + static Elm_Gengrid_Item_Class *it_class; + it_class = elm_gengrid_item_class_new(); + it_class->item_style = "default"; + it_class->func.text_get = _emo_label_get; + it_class->func.content_get = _emo_content_get; + it_class->func.del = _emo_del; theme = elm_theme_list_item_path_get("default", NULL); if (!theme) return NULL; @@ -106,9 +103,10 @@ _page_grid_add(Evas_Object *parent, App_Inwin_Data *aid) if (strncmp(emo, "elm/entry/emoticon/", 19)) continue; sscanf(emo, "elm/entry/emoticon/%[^/]/default", name); - elm_gengrid_item_append(grid, &it_class, strdup(name), _it_sel_cb, aid); + elm_gengrid_item_append(grid, it_class, strdup(name), _it_sel_cb, aid); } edje_file_collection_list_free(emos); + elm_gengrid_item_class_free(it_class); return grid; }