diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-03-30 16:23:29 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-03-30 16:23:29 +0200 |
commit | b7513a90c350bc3f768c3b1e7a42228f272314dd (patch) | |
tree | 470c89c4204905fdcba9e859a468790295d3fd26 /src/conversation/test_conversation_api_reject.c | |
parent | 7075d32a5bd56a95797b1113e4cf5638c14ca8fc (diff) | |
download | gnunet-b7513a90c350bc3f768c3b1e7a42228f272314dd.tar.gz gnunet-b7513a90c350bc3f768c3b1e7a42228f272314dd.zip |
fix conversation ftbfs issues:
Diffstat (limited to 'src/conversation/test_conversation_api_reject.c')
-rw-r--r-- | src/conversation/test_conversation_api_reject.c | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/src/conversation/test_conversation_api_reject.c b/src/conversation/test_conversation_api_reject.c index 9257764cf..284889e49 100644 --- a/src/conversation/test_conversation_api_reject.c +++ b/src/conversation/test_conversation_api_reject.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2013, 2014 GNUnet e.V. | 3 | Copyright (C) 2013, 2014, 2018 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -59,6 +59,7 @@ static char *gns_caller_id; | |||
59 | static int | 59 | static int |
60 | enable_speaker (void *cls) | 60 | enable_speaker (void *cls) |
61 | { | 61 | { |
62 | (void) cls; | ||
62 | GNUNET_break (0); | 63 | GNUNET_break (0); |
63 | return GNUNET_SYSERR; | 64 | return GNUNET_SYSERR; |
64 | } | 65 | } |
@@ -67,6 +68,7 @@ enable_speaker (void *cls) | |||
67 | static void | 68 | static void |
68 | disable_speaker (void *cls) | 69 | disable_speaker (void *cls) |
69 | { | 70 | { |
71 | (void) cls; | ||
70 | GNUNET_break (0); | 72 | GNUNET_break (0); |
71 | } | 73 | } |
72 | 74 | ||
@@ -76,6 +78,9 @@ play (void *cls, | |||
76 | size_t data_size, | 78 | size_t data_size, |
77 | const void *data) | 79 | const void *data) |
78 | { | 80 | { |
81 | (void) cls; | ||
82 | (void) data_size; | ||
83 | (void) data; | ||
79 | GNUNET_break (0); | 84 | GNUNET_break (0); |
80 | } | 85 | } |
81 | 86 | ||
@@ -83,6 +88,7 @@ play (void *cls, | |||
83 | static void | 88 | static void |
84 | destroy_speaker (void *cls) | 89 | destroy_speaker (void *cls) |
85 | { | 90 | { |
91 | (void) cls; | ||
86 | } | 92 | } |
87 | 93 | ||
88 | 94 | ||
@@ -100,6 +106,9 @@ enable_mic (void *cls, | |||
100 | GNUNET_MICROPHONE_RecordedDataCallback rdc, | 106 | GNUNET_MICROPHONE_RecordedDataCallback rdc, |
101 | void *rdc_cls) | 107 | void *rdc_cls) |
102 | { | 108 | { |
109 | (void) cls; | ||
110 | (void) rdc; | ||
111 | (void) rdc_cls; | ||
103 | GNUNET_break (0); | 112 | GNUNET_break (0); |
104 | return GNUNET_SYSERR; | 113 | return GNUNET_SYSERR; |
105 | } | 114 | } |
@@ -108,6 +117,7 @@ enable_mic (void *cls, | |||
108 | static void | 117 | static void |
109 | disable_mic (void *cls) | 118 | disable_mic (void *cls) |
110 | { | 119 | { |
120 | (void) cls; | ||
111 | GNUNET_break (0); | 121 | GNUNET_break (0); |
112 | } | 122 | } |
113 | 123 | ||
@@ -115,6 +125,7 @@ disable_mic (void *cls) | |||
115 | static void | 125 | static void |
116 | destroy_mic (void *cls) | 126 | destroy_mic (void *cls) |
117 | { | 127 | { |
128 | (void) cls; | ||
118 | } | 129 | } |
119 | 130 | ||
120 | 131 | ||
@@ -134,6 +145,7 @@ static struct GNUNET_MICROPHONE_Handle call_mic = { | |||
134 | static void | 145 | static void |
135 | end_test (void *cls) | 146 | end_test (void *cls) |
136 | { | 147 | { |
148 | (void) cls; | ||
137 | GNUNET_SCHEDULER_shutdown (); | 149 | GNUNET_SCHEDULER_shutdown (); |
138 | if (NULL != op) | 150 | if (NULL != op) |
139 | { | 151 | { |
@@ -179,6 +191,8 @@ phone_event_handler (void *cls, | |||
179 | static enum GNUNET_CONVERSATION_PhoneEventCode expect | 191 | static enum GNUNET_CONVERSATION_PhoneEventCode expect |
180 | = GNUNET_CONVERSATION_EC_PHONE_RING; | 192 | = GNUNET_CONVERSATION_EC_PHONE_RING; |
181 | 193 | ||
194 | (void) cls; | ||
195 | (void) caller_id; | ||
182 | GNUNET_break (code == expect); | 196 | GNUNET_break (code == expect); |
183 | switch (code) | 197 | switch (code) |
184 | { | 198 | { |
@@ -199,6 +213,7 @@ call_event_handler (void *cls, | |||
199 | static enum GNUNET_CONVERSATION_CallEventCode expect | 213 | static enum GNUNET_CONVERSATION_CallEventCode expect |
200 | = GNUNET_CONVERSATION_EC_CALL_RINGING; | 214 | = GNUNET_CONVERSATION_EC_CALL_RINGING; |
201 | 215 | ||
216 | (void) cls; | ||
202 | GNUNET_break (code == expect); | 217 | GNUNET_break (code == expect); |
203 | switch (code) | 218 | switch (code) |
204 | { | 219 | { |
@@ -229,6 +244,7 @@ static void | |||
229 | caller_ego_create_cont (void *cls, | 244 | caller_ego_create_cont (void *cls, |
230 | const char *emsg) | 245 | const char *emsg) |
231 | { | 246 | { |
247 | (void) cls; | ||
232 | op = NULL; | 248 | op = NULL; |
233 | GNUNET_assert (NULL == emsg); | 249 | GNUNET_assert (NULL == emsg); |
234 | } | 250 | } |
@@ -239,12 +255,15 @@ namestore_put_cont (void *cls, | |||
239 | int32_t success, | 255 | int32_t success, |
240 | const char *emsg) | 256 | const char *emsg) |
241 | { | 257 | { |
258 | (void) cls; | ||
242 | qe = NULL; | 259 | qe = NULL; |
243 | GNUNET_assert (GNUNET_YES == success); | 260 | GNUNET_assert (GNUNET_YES == success); |
244 | GNUNET_assert (NULL == emsg); | 261 | GNUNET_assert (NULL == emsg); |
245 | GNUNET_assert (NULL == op); | 262 | GNUNET_assert (NULL == op); |
246 | op = GNUNET_IDENTITY_create (id, "caller-ego", | 263 | op = GNUNET_IDENTITY_create (id, |
247 | &caller_ego_create_cont, NULL); | 264 | "caller-ego", |
265 | &caller_ego_create_cont, | ||
266 | NULL); | ||
248 | } | 267 | } |
249 | 268 | ||
250 | 269 | ||
@@ -257,6 +276,8 @@ identity_cb (void *cls, | |||
257 | struct GNUNET_GNSRECORD_Data rd; | 276 | struct GNUNET_GNSRECORD_Data rd; |
258 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 277 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
259 | 278 | ||
279 | (void) cls; | ||
280 | (void) ctx; | ||
260 | if (NULL == name) | 281 | if (NULL == name) |
261 | return; | 282 | return; |
262 | if (NULL == ego) | 283 | if (NULL == ego) |
@@ -294,7 +315,6 @@ identity_cb (void *cls, | |||
294 | GNUNET_GNSRECORD_pkey_to_zkey (&pub)); | 315 | GNUNET_GNSRECORD_pkey_to_zkey (&pub)); |
295 | call = GNUNET_CONVERSATION_call_start (cfg, | 316 | call = GNUNET_CONVERSATION_call_start (cfg, |
296 | ego, | 317 | ego, |
297 | ego, | ||
298 | gns_name, | 318 | gns_name, |
299 | &call_speaker, | 319 | &call_speaker, |
300 | &call_mic, | 320 | &call_mic, |
@@ -309,6 +329,7 @@ static void | |||
309 | phone_ego_create_cont (void *cls, | 329 | phone_ego_create_cont (void *cls, |
310 | const char *emsg) | 330 | const char *emsg) |
311 | { | 331 | { |
332 | (void) cls; | ||
312 | op = NULL; | 333 | op = NULL; |
313 | GNUNET_assert (NULL == emsg); | 334 | GNUNET_assert (NULL == emsg); |
314 | } | 335 | } |
@@ -319,13 +340,18 @@ run (void *cls, | |||
319 | const struct GNUNET_CONFIGURATION_Handle *c, | 340 | const struct GNUNET_CONFIGURATION_Handle *c, |
320 | struct GNUNET_TESTING_Peer *peer) | 341 | struct GNUNET_TESTING_Peer *peer) |
321 | { | 342 | { |
343 | (void) cls; | ||
344 | (void) peer; | ||
322 | cfg = c; | 345 | cfg = c; |
323 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, | 346 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, |
324 | NULL); | 347 | NULL); |
325 | id = GNUNET_IDENTITY_connect (cfg, | 348 | id = GNUNET_IDENTITY_connect (cfg, |
326 | &identity_cb, | 349 | &identity_cb, |
327 | NULL); | 350 | NULL); |
328 | op = GNUNET_IDENTITY_create (id, "phone-ego", &phone_ego_create_cont, NULL); | 351 | op = GNUNET_IDENTITY_create (id, |
352 | "phone-ego", | ||
353 | &phone_ego_create_cont, | ||
354 | NULL); | ||
329 | ns = GNUNET_NAMESTORE_connect (cfg); | 355 | ns = GNUNET_NAMESTORE_connect (cfg); |
330 | } | 356 | } |
331 | 357 | ||
@@ -333,6 +359,8 @@ run (void *cls, | |||
333 | int | 359 | int |
334 | main (int argc, char *argv[]) | 360 | main (int argc, char *argv[]) |
335 | { | 361 | { |
362 | (void) argc; | ||
363 | (void) argv; | ||
336 | if (0 != GNUNET_TESTING_peer_run ("test_conversation_api", | 364 | if (0 != GNUNET_TESTING_peer_run ("test_conversation_api", |
337 | "test_conversation.conf", | 365 | "test_conversation.conf", |
338 | &run, NULL)) | 366 | &run, NULL)) |