summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2014-02-28 13:32:04 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2014-02-28 14:37:53 +0100
commit4e2e2ea01e9684efbee666e1fffd06301c80bf18 (patch)
treeae915c8b5ad7863aa118cadca40f0f4149a2ed98 /src/examples
parent886c8d55b7707a041e3ae2a527bcb584680855b1 (diff)
examples: Use EINA_UNUSED in examples to silence a ton of warning
First step to get the examples compiling output in a useful state. With all the warning noise one would never see the important messages. If you add new code please make sure its warning free.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/ecore/ecore_evas_object_example.c2
-rw-r--r--src/examples/ecore/ecore_pipe_gstreamer_example.c8
-rw-r--r--src/examples/eina/eina_array_01.c4
-rw-r--r--src/examples/eina/eina_array_02.c4
-rw-r--r--src/examples/eina/eina_file_01.c4
-rw-r--r--src/examples/eina/eina_hash_07.c6
-rw-r--r--src/examples/eina/eina_hash_08.c6
-rw-r--r--src/examples/eina/eina_inarray_01.c2
-rw-r--r--src/examples/eina/eina_inarray_02.c2
-rw-r--r--src/examples/eina/eina_iterator_01.c4
-rw-r--r--src/examples/eina/eina_log_03.c2
-rw-r--r--src/examples/eina/eina_magic_01.c2
-rw-r--r--src/examples/eina/eina_simple_xml_parser_01.c4
-rw-r--r--src/examples/eina/eina_str_01.c2
-rw-r--r--src/examples/eina/eina_strbuf_01.c2
-rw-r--r--src/examples/eina/eina_stringshare_01.c2
-rw-r--r--src/examples/eina/eina_value_03.c12
-rw-r--r--src/examples/eio/eio_file_ls.c8
18 files changed, 38 insertions, 38 deletions
diff --git a/src/examples/ecore/ecore_evas_object_example.c b/src/examples/ecore/ecore_evas_object_example.c
index 0886123c58..95731d06ef 100644
--- a/src/examples/ecore/ecore_evas_object_example.c
+++ b/src/examples/ecore/ecore_evas_object_example.c
@@ -13,7 +13,7 @@
13#include <Ecore_Evas.h> 13#include <Ecore_Evas.h>
14 14
15static void 15static void
16_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info) 16_mouse_down_cb(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
17{ 17{
18 static Eina_Bool flag = EINA_FALSE; 18 static Eina_Bool flag = EINA_FALSE;
19 19
diff --git a/src/examples/ecore/ecore_pipe_gstreamer_example.c b/src/examples/ecore/ecore_pipe_gstreamer_example.c
index 20d3fa1163..df476ea7fb 100644
--- a/src/examples/ecore/ecore_pipe_gstreamer_example.c
+++ b/src/examples/ecore/ecore_pipe_gstreamer_example.c
@@ -15,7 +15,7 @@ static void new_decoded_pad_cb(GstElement *demuxer,
15 gpointer user_data); 15 gpointer user_data);
16 16
17static void 17static void
18handler(void *data, void *buf, unsigned int len) 18handler(void *data, void *buf, unsigned int len EINA_UNUSED)
19{ 19{
20 GstBuffer *buffer = *((GstBuffer **)buf); 20 GstBuffer *buffer = *((GstBuffer **)buf);
21 21
@@ -25,9 +25,9 @@ handler(void *data, void *buf, unsigned int len)
25} 25}
26 26
27static void 27static void
28handoff(GstElement *object, 28handoff(GstElement *object EINA_UNUSED,
29 GstBuffer *arg0, 29 GstBuffer *arg0,
30 GstPad *arg1, 30 GstPad *arg1 EINA_UNUSED,
31 gpointer user_data) 31 gpointer user_data)
32{ 32{
33 Ecore_Pipe *pipe; 33 Ecore_Pipe *pipe;
@@ -93,7 +93,7 @@ main(int argc, char *argv[])
93} 93}
94 94
95static void 95static void
96new_decoded_pad_cb(GstElement *demuxer, 96new_decoded_pad_cb(GstElement *demuxer EINA_UNUSED,
97 GstPad *new_pad, 97 GstPad *new_pad,
98 gpointer user_data) 98 gpointer user_data)
99{ 99{
diff --git a/src/examples/eina/eina_array_01.c b/src/examples/eina/eina_array_01.c
index f55832d23e..d57f38c39a 100644
--- a/src/examples/eina/eina_array_01.c
+++ b/src/examples/eina/eina_array_01.c
@@ -7,14 +7,14 @@
7#include <Eina.h> 7#include <Eina.h>
8 8
9static Eina_Bool 9static Eina_Bool
10_print(const void *container, void *data, void *fdata) 10_print(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNUSED)
11{ 11{
12 printf("%s\n", (char *)data); 12 printf("%s\n", (char *)data);
13 return EINA_TRUE; 13 return EINA_TRUE;
14} 14}
15 15
16int 16int
17main(int argc, char **argv) 17main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
18{ 18{
19 const char* strings[] = { 19 const char* strings[] = {
20 "helo", "hera", "starbuck", "kat", "boomer", 20 "helo", "hera", "starbuck", "kat", "boomer",
diff --git a/src/examples/eina/eina_array_02.c b/src/examples/eina/eina_array_02.c
index 6decdd3392..87bc070d56 100644
--- a/src/examples/eina/eina_array_02.c
+++ b/src/examples/eina/eina_array_02.c
@@ -6,7 +6,7 @@
6 6
7#include <Eina.h> 7#include <Eina.h>
8 8
9Eina_Bool keep(void *data, void *gdata) 9Eina_Bool keep(void *data, void *gdata EINA_UNUSED)
10{ 10{
11 if (strlen((const char*)data) <= 5) 11 if (strlen((const char*)data) <= 5)
12 return EINA_TRUE; 12 return EINA_TRUE;
@@ -14,7 +14,7 @@ Eina_Bool keep(void *data, void *gdata)
14} 14}
15 15
16int 16int
17main(int argc, char **argv) 17main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
18{ 18{
19 const char* strs[] = { 19 const char* strs[] = {
20 "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", 20 "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
diff --git a/src/examples/eina/eina_file_01.c b/src/examples/eina/eina_file_01.c
index 2c945b3ad7..edc35ef71d 100644
--- a/src/examples/eina/eina_file_01.c
+++ b/src/examples/eina/eina_file_01.c
@@ -5,13 +5,13 @@
5#include <Eina.h> 5#include <Eina.h>
6 6
7static void 7static void
8_print_cb(const char *name, const char *path, void *data) 8_print_cb(const char *name, const char *path, void *data EINA_UNUSED)
9{ 9{
10 printf("file %s in %s\n", name, path); 10 printf("file %s in %s\n", name, path);
11} 11}
12 12
13int 13int
14main(int argc, char **argv) 14main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
15{ 15{
16 Eina_Iterator *it; 16 Eina_Iterator *it;
17 const char *f_name; 17 const char *f_name;
diff --git a/src/examples/eina/eina_hash_07.c b/src/examples/eina/eina_hash_07.c
index e6f0455dda..c312766663 100644
--- a/src/examples/eina/eina_hash_07.c
+++ b/src/examples/eina/eina_hash_07.c
@@ -45,8 +45,8 @@ _phone_entry_free_cb(void *data)
45} 45}
46 46
47static Eina_Bool 47static Eina_Bool
48_phone_book_foreach_cb(const Eina_Hash *phone_book, const void *key, 48_phone_book_foreach_cb(const Eina_Hash *phone_book EINA_UNUSED, const void *key,
49 void *data, void *fdata) 49 void *data, void *fdata EINA_UNUSED)
50{ 50{
51 Phone_Entry **pe = (Phone_Entry **)key; 51 Phone_Entry **pe = (Phone_Entry **)key;
52 const char *nick = data; 52 const char *nick = data;
@@ -57,7 +57,7 @@ _phone_book_foreach_cb(const Eina_Hash *phone_book, const void *key,
57} 57}
58 58
59int 59int
60main(int argc, const char *argv[]) 60main(int argc EINA_UNUSED, const char *argv[] EINA_UNUSED)
61{ 61{
62 Eina_Hash *phone_book = NULL; 62 Eina_Hash *phone_book = NULL;
63 int i; 63 int i;
diff --git a/src/examples/eina/eina_hash_08.c b/src/examples/eina/eina_hash_08.c
index ce6a2a56d0..70b5d9dfc3 100644
--- a/src/examples/eina/eina_hash_08.c
+++ b/src/examples/eina/eina_hash_08.c
@@ -37,8 +37,8 @@ _phone_entry_free_cb(void *data)
37} 37}
38 38
39static Eina_Bool 39static Eina_Bool
40_phone_book_foreach_cb(const Eina_Hash *phone_book, const void *key, 40_phone_book_foreach_cb(const Eina_Hash *phone_book EINA_UNUSED, const void *key,
41 void *data, void *fdata) 41 void *data, void *fdata EINA_UNUSED)
42{ 42{
43 const char *name = key; 43 const char *name = key;
44 const char *number = data; 44 const char *number = data;
@@ -49,7 +49,7 @@ _phone_book_foreach_cb(const Eina_Hash *phone_book, const void *key,
49} 49}
50 50
51int 51int
52main(int argc, const char *argv[]) 52main(int argc EINA_UNUSED, const char *argv[] EINA_UNUSED)
53{ 53{
54 Eina_Hash *phone_book = NULL; 54 Eina_Hash *phone_book = NULL;
55 int i; 55 int i;
diff --git a/src/examples/eina/eina_inarray_01.c b/src/examples/eina/eina_inarray_01.c
index 2809778993..5cc0595542 100644
--- a/src/examples/eina/eina_inarray_01.c
+++ b/src/examples/eina/eina_inarray_01.c
@@ -9,7 +9,7 @@ cmp(const void *a, const void *b)
9 return *(int*)a > *(int*)b; 9 return *(int*)a > *(int*)b;
10} 10}
11 11
12int main(int argc, char **argv) 12int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
13{ 13{
14 Eina_Inarray *iarr; 14 Eina_Inarray *iarr;
15 char ch, *ch2; 15 char ch, *ch2;
diff --git a/src/examples/eina/eina_inarray_02.c b/src/examples/eina/eina_inarray_02.c
index a00fb66ca3..f0de62d1f8 100644
--- a/src/examples/eina/eina_inarray_02.c
+++ b/src/examples/eina/eina_inarray_02.c
@@ -4,7 +4,7 @@
4#include <Eina.h> 4#include <Eina.h>
5 5
6int 6int
7main(int argc, char **argv) 7main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
8{ 8{
9 const char* strings[] = { 9 const char* strings[] = {
10 "helo", "hera", "starbuck", "kat", "boomer", 10 "helo", "hera", "starbuck", "kat", "boomer",
diff --git a/src/examples/eina/eina_iterator_01.c b/src/examples/eina/eina_iterator_01.c
index bd1d7ba41f..5351ae96a2 100644
--- a/src/examples/eina/eina_iterator_01.c
+++ b/src/examples/eina/eina_iterator_01.c
@@ -6,7 +6,7 @@
6#include <Eina.h> 6#include <Eina.h>
7 7
8static Eina_Bool 8static Eina_Bool
9print_one(const void *container, void *data, void *fdata) 9print_one(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNUSED)
10{ 10{
11 printf("%s\n", (char*)data); 11 printf("%s\n", (char*)data);
12 return EINA_TRUE; 12 return EINA_TRUE;
@@ -20,7 +20,7 @@ print_eina_container(Eina_Iterator *it)
20} 20}
21 21
22int 22int
23main(int argc, char **argv) 23main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
24{ 24{
25 const char *strings[] = { 25 const char *strings[] = {
26 "unintersting string", "husker", "starbuck", "husker" 26 "unintersting string", "husker", "starbuck", "husker"
diff --git a/src/examples/eina/eina_log_03.c b/src/examples/eina/eina_log_03.c
index 8dbe19e715..4918872e44 100644
--- a/src/examples/eina/eina_log_03.c
+++ b/src/examples/eina/eina_log_03.c
@@ -17,7 +17,7 @@ struct _Data
17}; 17};
18 18
19void print_cb(const Eina_Log_Domain *domain, 19void print_cb(const Eina_Log_Domain *domain,
20 Eina_Log_Level level, 20 Eina_Log_Level level EINA_UNUSED,
21 const char *file, 21 const char *file,
22 const char *fnc, 22 const char *fnc,
23 int line, 23 int line,
diff --git a/src/examples/eina/eina_magic_01.c b/src/examples/eina/eina_magic_01.c
index 5eddd04b31..ed6b0da269 100644
--- a/src/examples/eina/eina_magic_01.c
+++ b/src/examples/eina/eina_magic_01.c
@@ -88,7 +88,7 @@ print_pilot(pilot *ptr)
88} 88}
89 89
90int 90int
91main(int argc, char **argv) 91main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
92{ 92{
93 person *base; 93 person *base;
94 pilot *sub; 94 pilot *sub;
diff --git a/src/examples/eina/eina_simple_xml_parser_01.c b/src/examples/eina/eina_simple_xml_parser_01.c
index ff217c0f68..5c01708a21 100644
--- a/src/examples/eina/eina_simple_xml_parser_01.c
+++ b/src/examples/eina/eina_simple_xml_parser_01.c
@@ -59,7 +59,7 @@ main(void)
59 59
60static Eina_Bool 60static Eina_Bool
61_xml_tag_cb(void *data, Eina_Simple_XML_Type type, const char *content, 61_xml_tag_cb(void *data, Eina_Simple_XML_Type type, const char *content,
62 unsigned offset, unsigned length) 62 unsigned offset EINA_UNUSED, unsigned length)
63{ 63{
64 char buffer[length+1]; 64 char buffer[length+1];
65 Eina_Array *array = data; 65 Eina_Array *array = data;
@@ -119,7 +119,7 @@ _xml_attr_cb(void *data, const char *key, const char *value)
119} 119}
120 120
121static Eina_Bool 121static Eina_Bool
122_print(const void *container, void *data, void *fdata) 122_print(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNUSED)
123{ 123{
124 printf("%s\n", (char *)data); 124 printf("%s\n", (char *)data);
125 125
diff --git a/src/examples/eina/eina_str_01.c b/src/examples/eina/eina_str_01.c
index 089a766863..25fe75a6b8 100644
--- a/src/examples/eina/eina_str_01.c
+++ b/src/examples/eina/eina_str_01.c
@@ -4,7 +4,7 @@
4#include <stdio.h> 4#include <stdio.h>
5#include <Eina.h> 5#include <Eina.h>
6 6
7int main(int argc, char **argv) 7int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
8{ 8{
9 char *names = "Calvin;Leoben;D'anna;Simon;Doral;Six;Daniel;Sharon"; 9 char *names = "Calvin;Leoben;D'anna;Simon;Doral;Six;Daniel;Sharon";
10 char *str; 10 char *str;
diff --git a/src/examples/eina/eina_strbuf_01.c b/src/examples/eina/eina_strbuf_01.c
index eddfccf724..4ee64729a2 100644
--- a/src/examples/eina/eina_strbuf_01.c
+++ b/src/examples/eina/eina_strbuf_01.c
@@ -4,7 +4,7 @@
4#include <stdio.h> 4#include <stdio.h>
5#include <Eina.h> 5#include <Eina.h>
6 6
7int main(int argc, char **argv) 7int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
8{ 8{
9 Eina_Strbuf *buf; 9 Eina_Strbuf *buf;
10 10
diff --git a/src/examples/eina/eina_stringshare_01.c b/src/examples/eina/eina_stringshare_01.c
index ae7ec20430..69fb147858 100644
--- a/src/examples/eina/eina_stringshare_01.c
+++ b/src/examples/eina/eina_stringshare_01.c
@@ -5,7 +5,7 @@
5#include <Eina.h> 5#include <Eina.h>
6 6
7int 7int
8main(int argc, char **argv) 8main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
9{ 9{
10 const char *str, *str2; 10 const char *str, *str2;
11 const char *prologe = "The Cylons were created by man. They rebelled. They " 11 const char *prologe = "The Cylons were created by man. They rebelled. They "
diff --git a/src/examples/eina/eina_value_03.c b/src/examples/eina/eina_value_03.c
index 964110944c..0f1d15b056 100644
--- a/src/examples/eina/eina_value_03.c
+++ b/src/examples/eina/eina_value_03.c
@@ -12,13 +12,13 @@ _tz_setup(const Eina_Value_Type *type, void *mem)
12} 12}
13 13
14static Eina_Bool 14static Eina_Bool
15_tz_flush(const Eina_Value_Type *type, void *mem) 15_tz_flush(const Eina_Value_Type *type EINA_UNUSED, void *mem EINA_UNUSED)
16{ 16{
17 return EINA_TRUE; 17 return EINA_TRUE;
18} 18}
19 19
20static Eina_Bool 20static Eina_Bool
21_tz_copy(const Eina_Value_Type *type, const void *src, void * dst) 21_tz_copy(const Eina_Value_Type *type EINA_UNUSED, const void *src, void * dst)
22{ 22{
23 struct timezone *tzsrc = (struct timezone *)src; 23 struct timezone *tzsrc = (struct timezone *)src;
24 struct timezone *tzdst = dst; 24 struct timezone *tzdst = dst;
@@ -27,7 +27,7 @@ _tz_copy(const Eina_Value_Type *type, const void *src, void * dst)
27} 27}
28 28
29static Eina_Bool 29static Eina_Bool
30_tz_compare(const Eina_Value_Type *type, const void *a, const void *b) 30_tz_compare(const Eina_Value_Type *type EINA_UNUSED, const void *a, const void *b)
31{ 31{
32 struct timezone tza = *(struct timezone*)a; 32 struct timezone tza = *(struct timezone*)a;
33 struct timezone tzb = *(struct timezone*)b; 33 struct timezone tzb = *(struct timezone*)b;
@@ -40,7 +40,7 @@ _tz_compare(const Eina_Value_Type *type, const void *a, const void *b)
40} 40}
41 41
42static Eina_Bool 42static Eina_Bool
43_tz_pset(const Eina_Value_Type *type, void *mem, const void *ptr) 43_tz_pset(const Eina_Value_Type *type EINA_UNUSED, void *mem, const void *ptr)
44{ 44{
45 *(struct timezone*)mem = *(struct timezone*)ptr; 45 *(struct timezone*)mem = *(struct timezone*)ptr;
46 return EINA_TRUE; 46 return EINA_TRUE;
@@ -61,7 +61,7 @@ _tz_pget(const Eina_Value_Type *type, const void *mem, void *ptr)
61} 61}
62 62
63static Eina_Bool 63static Eina_Bool
64_tz_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) 64_tz_convert_to(const Eina_Value_Type *type EINA_UNUSED, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
65{ 65{
66 struct timezone v = *(struct timezone*)type_mem; 66 struct timezone v = *(struct timezone*)type_mem;
67 67
@@ -146,7 +146,7 @@ static Eina_Value_Type TZ_TYPE = {
146 _tz_pget 146 _tz_pget
147}; 147};
148 148
149int main(int argc, char **argv) 149int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
150{ 150{
151 Eina_Value vtv, vtz; 151 Eina_Value vtv, vtz;
152 struct timeval tv; 152 struct timeval tv;
diff --git a/src/examples/eio/eio_file_ls.c b/src/examples/eio/eio_file_ls.c
index 795e80bf4a..a9315ff90e 100644
--- a/src/examples/eio/eio_file_ls.c
+++ b/src/examples/eio/eio_file_ls.c
@@ -8,7 +8,7 @@
8#include <Ecore.h> 8#include <Ecore.h>
9 9
10static Eina_Bool 10static Eina_Bool
11_filter_cb(void *data, Eio_File *handler, const char *file) 11_filter_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, const char *file)
12{ 12{
13 char *last_slash = strrchr(file, '/'); 13 char *last_slash = strrchr(file, '/');
14 14
@@ -20,7 +20,7 @@ _filter_cb(void *data, Eio_File *handler, const char *file)
20} 20}
21 21
22static void 22static void
23_main_cb(void *data, Eio_File *handler, const char *file) 23_main_cb(void *data, Eio_File *handler EINA_UNUSED, const char *file)
24{ 24{
25 int *number_of_listed_files = (int *)data; 25 int *number_of_listed_files = (int *)data;
26 26
@@ -30,7 +30,7 @@ _main_cb(void *data, Eio_File *handler, const char *file)
30} 30}
31 31
32static void 32static void
33_done_cb(void *data, Eio_File *handler) 33_done_cb(void *data, Eio_File *handler EINA_UNUSED)
34{ 34{
35 int *number_of_listed_files = (int *)data; 35 int *number_of_listed_files = (int *)data;
36 36
@@ -41,7 +41,7 @@ _done_cb(void *data, Eio_File *handler)
41} 41}
42 42
43static void 43static void
44_error_cb(void *data, Eio_File *handler, int error) 44_error_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, int error)
45{ 45{
46 fprintf(stderr, "Something wrong has happend:%s\n", strerror(error)); 46 fprintf(stderr, "Something wrong has happend:%s\n", strerror(error));
47 ecore_main_loop_quit(); 47 ecore_main_loop_quit();