diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-06-06 08:20:53 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-06-06 08:20:53 +0200 |
commit | 561d9096a28037d65783cf40d4016e39a0cf3a2b (patch) | |
tree | 2591bb1ac9bb5d0b47c6d37447e1d40cfc8040a9 /src/conversation/gnunet-conversation-test.c | |
parent | 8eb738e7d6005ffd5e6cbb1ae80316ed0da6e3f9 (diff) | |
download | gnunet-561d9096a28037d65783cf40d4016e39a0cf3a2b.tar.gz gnunet-561d9096a28037d65783cf40d4016e39a0cf3a2b.zip |
fix misc compiler warnings
Diffstat (limited to 'src/conversation/gnunet-conversation-test.c')
-rw-r--r-- | src/conversation/gnunet-conversation-test.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/conversation/gnunet-conversation-test.c b/src/conversation/gnunet-conversation-test.c index 75605384f..ac99e4d14 100644 --- a/src/conversation/gnunet-conversation-test.c +++ b/src/conversation/gnunet-conversation-test.c | |||
@@ -97,6 +97,7 @@ do_shutdown (void *cls) | |||
97 | { | 97 | { |
98 | struct Recording *rec; | 98 | struct Recording *rec; |
99 | 99 | ||
100 | (void) cls; | ||
100 | if (NULL != switch_task) | 101 | if (NULL != switch_task) |
101 | GNUNET_SCHEDULER_cancel (switch_task); | 102 | GNUNET_SCHEDULER_cancel (switch_task); |
102 | if (NULL != microphone) | 103 | if (NULL != microphone) |
@@ -123,8 +124,7 @@ do_shutdown (void *cls) | |||
123 | static void | 124 | static void |
124 | switch_to_speaker (void *cls) | 125 | switch_to_speaker (void *cls) |
125 | { | 126 | { |
126 | struct Recording *rec; | 127 | (void) cls; |
127 | |||
128 | switch_task = NULL; | 128 | switch_task = NULL; |
129 | microphone->disable_microphone (microphone->cls); | 129 | microphone->disable_microphone (microphone->cls); |
130 | if (GNUNET_OK != | 130 | if (GNUNET_OK != |
@@ -138,7 +138,7 @@ switch_to_speaker (void *cls) | |||
138 | } | 138 | } |
139 | fprintf (stderr, | 139 | fprintf (stderr, |
140 | _("\nWe are now playing your recording back. If you can hear it, your audio settings are working...")); | 140 | _("\nWe are now playing your recording back. If you can hear it, your audio settings are working...")); |
141 | for (rec=rec_head; NULL != rec; rec = rec->next) | 141 | for (struct Recording *rec=rec_head; NULL != rec; rec = rec->next) |
142 | { | 142 | { |
143 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 143 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
144 | "Replaying %u bytes\n", | 144 | "Replaying %u bytes\n", |
@@ -168,6 +168,7 @@ record (void *cls, | |||
168 | { | 168 | { |
169 | struct Recording *rec; | 169 | struct Recording *rec; |
170 | 170 | ||
171 | (void) cls; | ||
171 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 172 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
172 | "Recorded %u bytes\n", | 173 | "Recorded %u bytes\n", |
173 | (unsigned int) data_size); | 174 | (unsigned int) data_size); |
@@ -189,9 +190,14 @@ record (void *cls, | |||
189 | * @param cfg configuration | 190 | * @param cfg configuration |
190 | */ | 191 | */ |
191 | static void | 192 | static void |
192 | run (void *cls, char *const *args, const char *cfgfile, | 193 | run (void *cls, |
194 | char *const *args, | ||
195 | const char *cfgfile, | ||
193 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 196 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
194 | { | 197 | { |
198 | (void) cls; | ||
199 | (void) args; | ||
200 | (void) cfgfile; | ||
195 | microphone = GNUNET_MICROPHONE_create_from_hardware (cfg); | 201 | microphone = GNUNET_MICROPHONE_create_from_hardware (cfg); |
196 | GNUNET_assert (NULL != microphone); | 202 | GNUNET_assert (NULL != microphone); |
197 | speaker = GNUNET_SPEAKER_create_from_hardware (cfg); | 203 | speaker = GNUNET_SPEAKER_create_from_hardware (cfg); |
@@ -225,17 +231,24 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
225 | * @return 0 ok, 1 on error | 231 | * @return 0 ok, 1 on error |
226 | */ | 232 | */ |
227 | int | 233 | int |
228 | main (int argc, char *const *argv) | 234 | main (int argc, |
235 | char *const *argv) | ||
229 | { | 236 | { |
230 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 237 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { |
231 | GNUNET_GETOPT_OPTION_END | 238 | GNUNET_GETOPT_OPTION_END |
232 | }; | 239 | }; |
233 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 240 | |
241 | if (GNUNET_OK != | ||
242 | GNUNET_STRINGS_get_utf8_args (argc, argv, | ||
243 | &argc, &argv)) | ||
234 | return 2; | 244 | return 2; |
235 | 245 | ||
236 | ret = (GNUNET_OK == | 246 | ret = (GNUNET_OK == |
237 | GNUNET_PROGRAM_run (argc, argv, "gnunet-conversation-test", | 247 | GNUNET_PROGRAM_run (argc, argv, |
238 | gettext_noop ("help text"), options, &run, | 248 | "gnunet-conversation-test", |
249 | gettext_noop ("help text"), | ||
250 | options, | ||
251 | &run, | ||
239 | NULL)) ? ret : 1; | 252 | NULL)) ? ret : 1; |
240 | GNUNET_free ((void*) argv); | 253 | GNUNET_free ((void*) argv); |
241 | return ret; | 254 | return ret; |