summaryrefslogtreecommitdiff
path: root/legacy/elementary
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-26 23:46:53 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-26 23:46:53 +0000
commit6be717ba94989ac4d3e8e48ff0f92d4c84f08814 (patch)
treec56809e0db9472881625d5d55d8202753aa09757 /legacy/elementary
parent9f68d6896528d02cbfa4ab827ee2d30a429df14c (diff)
elm examples: Fixed some build warnings.
SVN revision: 69642
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/examples/bubble_example_01.c5
-rw-r--r--legacy/elementary/src/examples/button_example_00.c2
-rw-r--r--legacy/elementary/src/examples/calendar_example_02.c4
-rw-r--r--legacy/elementary/src/examples/calendar_example_05.c6
-rw-r--r--legacy/elementary/src/examples/check_example_01.c5
-rw-r--r--legacy/elementary/src/examples/entry_example.c18
6 files changed, 18 insertions, 22 deletions
diff --git a/legacy/elementary/src/examples/bubble_example_01.c b/legacy/elementary/src/examples/bubble_example_01.c
index b601b85f09..0d3e546b63 100644
--- a/legacy/elementary/src/examples/bubble_example_01.c
+++ b/legacy/elementary/src/examples/bubble_example_01.c
@@ -11,7 +11,7 @@ static const char *corners[] = {"top_left", "top_right",
11 11
12 12
13void 13void
14_bla(void *data, Evas_Object *obj, void *event_info) 14_bla(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
15{ 15{
16 static unsigned char corner = 0; 16 static unsigned char corner = 0;
17 ++corner; 17 ++corner;
@@ -23,10 +23,9 @@ _bla(void *data, Evas_Object *obj, void *event_info)
23} 23}
24 24
25EAPI_MAIN int 25EAPI_MAIN int
26elm_main(int argc, char **argv) 26elm_main(int argc __UNUSED__, char **argv __UNUSED__)
27{ 27{
28 Evas_Object *win, *bg, *bubble, *label, *icon; 28 Evas_Object *win, *bg, *bubble, *label, *icon;
29 char buf[256];
30 29
31 win = elm_win_add(NULL, "bubble", ELM_WIN_BASIC); 30 win = elm_win_add(NULL, "bubble", ELM_WIN_BASIC);
32 elm_win_title_set(win, "Bubble"); 31 elm_win_title_set(win, "Bubble");
diff --git a/legacy/elementary/src/examples/button_example_00.c b/legacy/elementary/src/examples/button_example_00.c
index cc69c2813f..51b9a54b4e 100644
--- a/legacy/elementary/src/examples/button_example_00.c
+++ b/legacy/elementary/src/examples/button_example_00.c
@@ -9,7 +9,7 @@
9#endif 9#endif
10 10
11static void 11static void
12on_click(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 12on_click(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
13{ 13{
14 elm_exit(); 14 elm_exit();
15} 15}
diff --git a/legacy/elementary/src/examples/calendar_example_02.c b/legacy/elementary/src/examples/calendar_example_02.c
index 0a0085baa3..9db3855c88 100644
--- a/legacy/elementary/src/examples/calendar_example_02.c
+++ b/legacy/elementary/src/examples/calendar_example_02.c
@@ -18,11 +18,11 @@
18#endif 18#endif
19 19
20static char * 20static char *
21_format_month_year(struct tm *stime) 21_format_month_year(struct tm *format_time)
22{ 22{
23 char buf[32]; 23 char buf[32];
24 /* abbreviates month and year */ 24 /* abbreviates month and year */
25 if (!strftime(buf, sizeof(buf), "%b %y", stime)) return NULL; 25 if (!strftime(buf, sizeof(buf), "%b %y", format_time)) return NULL;
26 return strdup(buf); 26 return strdup(buf);
27} 27}
28 28
diff --git a/legacy/elementary/src/examples/calendar_example_05.c b/legacy/elementary/src/examples/calendar_example_05.c
index 0a676a8452..9a2b702309 100644
--- a/legacy/elementary/src/examples/calendar_example_05.c
+++ b/legacy/elementary/src/examples/calendar_example_05.c
@@ -22,10 +22,10 @@ _print_cal_info_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __U
22 int year_min, year_max; 22 int year_min, year_max;
23 Eina_Bool sel_enabled; 23 Eina_Bool sel_enabled;
24 const char **wds; 24 const char **wds;
25 struct tm stime; 25 struct tm sel_time;
26 double interval; 26 double interval;
27 27
28 if (!elm_calendar_selected_time_get(obj, &stime)) 28 if (!elm_calendar_selected_time_get(obj, &sel_time))
29 return; 29 return;
30 30
31 interval = elm_calendar_interval_get(obj); 31 interval = elm_calendar_interval_get(obj);
@@ -36,7 +36,7 @@ _print_cal_info_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __U
36 printf("Day: %i, Mon: %i, Year %i, WeekDay: %i<br>\n" 36 printf("Day: %i, Mon: %i, Year %i, WeekDay: %i<br>\n"
37 "Interval: %0.2f, Year_Min: %i, Year_Max %i, Sel Enabled : %i<br>\n" 37 "Interval: %0.2f, Year_Min: %i, Year_Max %i, Sel Enabled : %i<br>\n"
38 "Weekdays: %s, %s, %s, %s, %s, %s, %s<br>\n\n", 38 "Weekdays: %s, %s, %s, %s, %s, %s, %s<br>\n\n",
39 stime.tm_mday, stime.tm_mon, stime.tm_year + 1900, stime.tm_wday, 39 sel_time.tm_mday, sel_time.tm_mon, sel_time.tm_year + 1900, sel_time.tm_wday,
40 interval, year_min, year_max, sel_enabled, 40 interval, year_min, year_max, sel_enabled,
41 wds[0], wds[1], wds[2], wds[3], wds[4], wds[5], wds[6]); 41 wds[0], wds[1], wds[2], wds[3], wds[4], wds[5], wds[6]);
42} 42}
diff --git a/legacy/elementary/src/examples/check_example_01.c b/legacy/elementary/src/examples/check_example_01.c
index cec20965f7..84e5923fc3 100644
--- a/legacy/elementary/src/examples/check_example_01.c
+++ b/legacy/elementary/src/examples/check_example_01.c
@@ -9,11 +9,10 @@
9static void _print(void *data, Evas_Object *obj, void *event_info); 9static void _print(void *data, Evas_Object *obj, void *event_info);
10 10
11EAPI_MAIN int 11EAPI_MAIN int
12elm_main(int argc, char **argv) 12elm_main(int argc __UNUSED__, char **argv __UNUSED__)
13{ 13{
14 Evas_Object *win, *bg, *cb, *cb2, *icon; 14 Evas_Object *win, *bg, *cb, *cb2, *icon;
15 Eina_Bool value; 15 Eina_Bool value;
16 char buf[256];
17 16
18 win = elm_win_add(NULL, "check", ELM_WIN_BASIC); 17 win = elm_win_add(NULL, "check", ELM_WIN_BASIC);
19 elm_win_title_set(win, "Check"); 18 elm_win_title_set(win, "Check");
@@ -57,7 +56,7 @@ elm_main(int argc, char **argv)
57ELM_MAIN() 56ELM_MAIN()
58 57
59static void 58static void
60_print(void *data, Evas_Object *obj, void *event_info) 59_print(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
61{ 60{
62 printf("check %smarked\n", *((Eina_Bool*)data) ? "" : "un"); 61 printf("check %smarked\n", *((Eina_Bool*)data) ? "" : "un");
63} 62}
diff --git a/legacy/elementary/src/examples/entry_example.c b/legacy/elementary/src/examples/entry_example.c
index 64842c2a11..a3ab9c97d7 100644
--- a/legacy/elementary/src/examples/entry_example.c
+++ b/legacy/elementary/src/examples/entry_example.c
@@ -78,15 +78,12 @@ _page_grid_add(Evas_Object *parent, App_Inwin_Data *aid)
78 Evas_Object *grid; 78 Evas_Object *grid;
79 char *theme, *emo; 79 char *theme, *emo;
80 Eina_List *emos, *it; 80 Eina_List *emos, *it;
81 static Elm_Gengrid_Item_Class it_class = { 81 static Elm_Gengrid_Item_Class *it_class;
82 "default", 82 it_class = elm_gengrid_item_class_new();
83 { 83 it_class->item_style = "default";
84 _emo_label_get, 84 it_class->func.text_get = _emo_label_get;
85 _emo_content_get, 85 it_class->func.content_get = _emo_content_get;
86 NULL, 86 it_class->func.del = _emo_del;
87 _emo_del
88 }
89 };
90 87
91 theme = elm_theme_list_item_path_get("default", NULL); 88 theme = elm_theme_list_item_path_get("default", NULL);
92 if (!theme) return NULL; 89 if (!theme) return NULL;
@@ -106,9 +103,10 @@ _page_grid_add(Evas_Object *parent, App_Inwin_Data *aid)
106 if (strncmp(emo, "elm/entry/emoticon/", 19)) 103 if (strncmp(emo, "elm/entry/emoticon/", 19))
107 continue; 104 continue;
108 sscanf(emo, "elm/entry/emoticon/%[^/]/default", name); 105 sscanf(emo, "elm/entry/emoticon/%[^/]/default", name);
109 elm_gengrid_item_append(grid, &it_class, strdup(name), _it_sel_cb, aid); 106 elm_gengrid_item_append(grid, it_class, strdup(name), _it_sel_cb, aid);
110 } 107 }
111 edje_file_collection_list_free(emos); 108 edje_file_collection_list_free(emos);
109 elm_gengrid_item_class_free(it_class);
112 110
113 return grid; 111 return grid;
114} 112}