diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-05-06 14:44:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-05-06 14:44:08 +0000 |
commit | e8cf81fdb3fdaef59b49da8f6e952a3225ab326e (patch) | |
tree | 4e5f75d44a9121b32895fdfc5a4177052a7d923d /src/ats-tests | |
parent | ae8cb91d9961899075a892a3110204bc139c2eb6 (diff) | |
download | gnunet-e8cf81fdb3fdaef59b49da8f6e952a3225ab326e.tar.gz gnunet-e8cf81fdb3fdaef59b49da8f6e952a3225ab326e.zip |
fixing compiler warnings
Diffstat (limited to 'src/ats-tests')
-rw-r--r-- | src/ats-tests/ats-testing-log.c | 27 | ||||
-rw-r--r-- | src/ats-tests/ats-testing-preferences.c | 46 | ||||
-rw-r--r-- | src/ats-tests/ats-testing-traffic.c | 50 | ||||
-rw-r--r-- | src/ats-tests/ats-testing.c | 10 | ||||
-rw-r--r-- | src/ats-tests/ats-testing.h | 27 |
5 files changed, 82 insertions, 78 deletions
diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c index 5e22d4b47..87af31f5f 100644 --- a/src/ats-tests/ats-testing-log.c +++ b/src/ats-tests/ats-testing-log.c | |||
@@ -698,12 +698,13 @@ GNUNET_ATS_TEST_logging_now (struct LoggingHandle *l) | |||
698 | if (GNUNET_YES == l->verbose) | 698 | if (GNUNET_YES == l->verbose) |
699 | { | 699 | { |
700 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 700 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
701 | "Master[%u] delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", c_m, | 701 | "Master[%u] delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", |
702 | delta.rel_value_us, | 702 | c_m, |
703 | mlt->total_bytes_sent, | 703 | (unsigned long long) delta.rel_value_us, |
704 | mlt->total_bytes_received, | 704 | mlt->total_bytes_sent, |
705 | mlt->total_throughput_send, | 705 | mlt->total_bytes_received, |
706 | mlt->total_throughput_recv); | 706 | mlt->total_throughput_send, |
707 | mlt->total_throughput_recv); | ||
707 | } | 708 | } |
708 | 709 | ||
709 | mlt->slaves_log = GNUNET_malloc (bp->peer->num_partners * | 710 | mlt->slaves_log = GNUNET_malloc (bp->peer->num_partners * |
@@ -783,13 +784,13 @@ GNUNET_ATS_TEST_logging_now (struct LoggingHandle *l) | |||
783 | if (GNUNET_YES == l->verbose) | 784 | if (GNUNET_YES == l->verbose) |
784 | { | 785 | { |
785 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 786 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
786 | "Master [%u] -> Slave [%u]: delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", | 787 | "Master [%u] -> Slave [%u]: delta: %llu us, bytes (sent/received): %u / %u; throughput send/recv: %u / %u\n", |
787 | c_m, c_s, | 788 | c_m, c_s, |
788 | delta.rel_value_us, | 789 | (unsigned long long) delta.rel_value_us, |
789 | mlt->total_bytes_sent, | 790 | mlt->total_bytes_sent, |
790 | mlt->total_bytes_received, | 791 | mlt->total_bytes_received, |
791 | slt->throughput_sent, | 792 | slt->throughput_sent, |
792 | slt->throughput_recv); | 793 | slt->throughput_recv); |
793 | } | 794 | } |
794 | else | 795 | else |
795 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 796 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
diff --git a/src/ats-tests/ats-testing-preferences.c b/src/ats-tests/ats-testing-preferences.c index 856c8de4b..256fa844b 100644 --- a/src/ats-tests/ats-testing-preferences.c +++ b/src/ats-tests/ats-testing-preferences.c | |||
@@ -143,13 +143,13 @@ set_pref_task (void *cls) | |||
143 | */ | 143 | */ |
144 | struct PreferenceGenerator * | 144 | struct PreferenceGenerator * |
145 | GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src, | 145 | GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src, |
146 | struct BenchmarkPartner *dest, | 146 | struct BenchmarkPartner *dest, |
147 | enum GeneratorType type, | 147 | enum GeneratorType type, |
148 | long int base_value, | 148 | unsigned int base_value, |
149 | long int value_rate, | 149 | unsigned int value_rate, |
150 | struct GNUNET_TIME_Relative period, | 150 | struct GNUNET_TIME_Relative period, |
151 | struct GNUNET_TIME_Relative frequency, | 151 | struct GNUNET_TIME_Relative frequency, |
152 | enum GNUNET_ATS_PreferenceKind kind) | 152 | enum GNUNET_ATS_PreferenceKind kind) |
153 | { | 153 | { |
154 | struct PreferenceGenerator *pg; | 154 | struct PreferenceGenerator *pg; |
155 | 155 | ||
@@ -174,31 +174,31 @@ GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src, | |||
174 | switch (type) { | 174 | switch (type) { |
175 | case GNUNET_ATS_TEST_TG_CONSTANT: | 175 | case GNUNET_ATS_TEST_TG_CONSTANT: |
176 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 176 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
177 | "Setting up constant preference generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n", | 177 | "Setting up constant preference generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n", |
178 | dest->me->no, GNUNET_i2s (&dest->me->id), | 178 | dest->me->no, GNUNET_i2s (&dest->me->id), |
179 | dest->dest->no, GNUNET_i2s (&dest->dest->id), | 179 | dest->dest->no, GNUNET_i2s (&dest->dest->id), |
180 | base_value); | 180 | base_value); |
181 | break; | 181 | break; |
182 | case GNUNET_ATS_TEST_TG_LINEAR: | 182 | case GNUNET_ATS_TEST_TG_LINEAR: |
183 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 183 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
184 | "Setting up linear preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n", | 184 | "Setting up linear preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n", |
185 | dest->me->no, GNUNET_i2s (&dest->me->id), | 185 | dest->me->no, GNUNET_i2s (&dest->me->id), |
186 | dest->dest->no, GNUNET_i2s (&dest->dest->id), | 186 | dest->dest->no, GNUNET_i2s (&dest->dest->id), |
187 | base_value, value_rate); | 187 | base_value, value_rate); |
188 | break; | 188 | break; |
189 | case GNUNET_ATS_TEST_TG_SINUS: | 189 | case GNUNET_ATS_TEST_TG_SINUS: |
190 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 190 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
191 | "Setting up sinus preference generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n", | 191 | "Setting up sinus preference generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n", |
192 | dest->me->no, GNUNET_i2s (&dest->me->id), | 192 | dest->me->no, GNUNET_i2s (&dest->me->id), |
193 | dest->dest->no, GNUNET_i2s (&dest->dest->id), | 193 | dest->dest->no, GNUNET_i2s (&dest->dest->id), |
194 | base_value, value_rate); | 194 | base_value, value_rate); |
195 | break; | 195 | break; |
196 | case GNUNET_ATS_TEST_TG_RANDOM: | 196 | case GNUNET_ATS_TEST_TG_RANDOM: |
197 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 197 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
198 | "Setting up random preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n", | 198 | "Setting up random preference generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n", |
199 | dest->me->no, GNUNET_i2s (&dest->me->id), | 199 | dest->me->no, GNUNET_i2s (&dest->me->id), |
200 | dest->dest->no, GNUNET_i2s (&dest->dest->id), | 200 | dest->dest->no, GNUNET_i2s (&dest->dest->id), |
201 | base_value, value_rate); | 201 | base_value, value_rate); |
202 | break; | 202 | break; |
203 | default: | 203 | default: |
204 | break; | 204 | break; |
diff --git a/src/ats-tests/ats-testing-traffic.c b/src/ats-tests/ats-testing-traffic.c index 5eb01bd55..f0bab7367 100644 --- a/src/ats-tests/ats-testing-traffic.c +++ b/src/ats-tests/ats-testing-traffic.c | |||
@@ -93,8 +93,9 @@ get_delay (struct TrafficGenerator *tg) | |||
93 | delay.rel_value_us = GNUNET_TIME_UNIT_SECONDS.rel_value_us * TEST_MESSAGE_SIZE / cur_rate; | 93 | delay.rel_value_us = GNUNET_TIME_UNIT_SECONDS.rel_value_us * TEST_MESSAGE_SIZE / cur_rate; |
94 | 94 | ||
95 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 95 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
96 | "Current rate is %u, calculated delay is %u \n", | 96 | "Current rate is %lld, calculated delay is %llu\n", |
97 | cur_rate, delay.rel_value_us); | 97 | cur_rate, |
98 | (unsigned long long) delay.rel_value_us); | ||
98 | return delay; | 99 | return delay; |
99 | } | 100 | } |
100 | 101 | ||
@@ -308,12 +309,12 @@ GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p) | |||
308 | */ | 309 | */ |
309 | struct TrafficGenerator * | 310 | struct TrafficGenerator * |
310 | GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, | 311 | GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, |
311 | struct BenchmarkPartner *dest, | 312 | struct BenchmarkPartner *dest, |
312 | enum GeneratorType type, | 313 | enum GeneratorType type, |
313 | long int base_rate, | 314 | unsigned int base_rate, |
314 | long int max_rate, | 315 | unsigned int max_rate, |
315 | struct GNUNET_TIME_Relative period, | 316 | struct GNUNET_TIME_Relative period, |
316 | struct GNUNET_TIME_Relative duration) | 317 | struct GNUNET_TIME_Relative duration) |
317 | { | 318 | { |
318 | struct TrafficGenerator *tg; | 319 | struct TrafficGenerator *tg; |
319 | 320 | ||
@@ -337,31 +338,32 @@ GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, | |||
337 | switch (type) { | 338 | switch (type) { |
338 | case GNUNET_ATS_TEST_TG_CONSTANT: | 339 | case GNUNET_ATS_TEST_TG_CONSTANT: |
339 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 340 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
340 | "Setting up constant traffic generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n", | 341 | "Setting up constant traffic generator master[%u] `%s' and slave [%u] `%s' max %u Bips\n", |
341 | dest->me->no, GNUNET_i2s (&dest->me->id), | 342 | dest->me->no, GNUNET_i2s (&dest->me->id), |
342 | dest->dest->no, GNUNET_i2s (&dest->dest->id), | 343 | dest->dest->no, GNUNET_i2s (&dest->dest->id), |
343 | base_rate); | 344 | base_rate); |
344 | break; | 345 | break; |
345 | case GNUNET_ATS_TEST_TG_LINEAR: | 346 | case GNUNET_ATS_TEST_TG_LINEAR: |
346 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 347 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
347 | "Setting up linear traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n", | 348 | "Setting up linear traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bips\n", |
348 | dest->me->no, GNUNET_i2s (&dest->me->id), | 349 | dest->me->no, GNUNET_i2s (&dest->me->id), |
349 | dest->dest->no, GNUNET_i2s (&dest->dest->id), | 350 | dest->dest->no, GNUNET_i2s (&dest->dest->id), |
350 | base_rate, max_rate); | 351 | base_rate, |
352 | max_rate); | ||
351 | break; | 353 | break; |
352 | case GNUNET_ATS_TEST_TG_SINUS: | 354 | case GNUNET_ATS_TEST_TG_SINUS: |
353 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 355 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
354 | "Setting up sinus traffic generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n", | 356 | "Setting up sinus traffic generator master[%u] `%s' and slave [%u] `%s' baserate %u Bips, amplitude %u Bps\n", |
355 | dest->me->no, GNUNET_i2s (&dest->me->id), | 357 | dest->me->no, GNUNET_i2s (&dest->me->id), |
356 | dest->dest->no, GNUNET_i2s (&dest->dest->id), | 358 | dest->dest->no, GNUNET_i2s (&dest->dest->id), |
357 | base_rate, max_rate); | 359 | base_rate, max_rate); |
358 | break; | 360 | break; |
359 | case GNUNET_ATS_TEST_TG_RANDOM: | 361 | case GNUNET_ATS_TEST_TG_RANDOM: |
360 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 362 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
361 | "Setting up random traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n", | 363 | "Setting up random traffic generator master[%u] `%s' and slave [%u] `%s' min %u Bips max %u Bps\n", |
362 | dest->me->no, GNUNET_i2s (&dest->me->id), | 364 | dest->me->no, GNUNET_i2s (&dest->me->id), |
363 | dest->dest->no, GNUNET_i2s (&dest->dest->id), | 365 | dest->dest->no, GNUNET_i2s (&dest->dest->id), |
364 | base_rate, max_rate); | 366 | base_rate, max_rate); |
365 | break; | 367 | break; |
366 | default: | 368 | default: |
367 | break; | 369 | break; |
diff --git a/src/ats-tests/ats-testing.c b/src/ats-tests/ats-testing.c index 49aa5a052..24d464424 100644 --- a/src/ats-tests/ats-testing.c +++ b/src/ats-tests/ats-testing.c | |||
@@ -243,8 +243,9 @@ comm_connect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) | |||
243 | 243 | ||
244 | if (me->core_slave_connections == top->num_slaves) | 244 | if (me->core_slave_connections == top->num_slaves) |
245 | { | 245 | { |
246 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Master [%u] connected all slaves\n", | 246 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, |
247 | me->no); | 247 | "Master [%u] connected all slaves\n", |
248 | me->no); | ||
248 | } | 249 | } |
249 | completed = GNUNET_YES; | 250 | completed = GNUNET_YES; |
250 | for (c = 0; c < top->num_masters; c++) | 251 | for (c = 0; c < top->num_masters; c++) |
@@ -254,9 +255,8 @@ comm_connect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) | |||
254 | } | 255 | } |
255 | if (GNUNET_YES == completed) | 256 | if (GNUNET_YES == completed) |
256 | { | 257 | { |
257 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 258 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
258 | "All master peers connected all slave peers\n", id, | 259 | "All master peers connected all slave peers\n"); |
259 | GNUNET_i2s (peer)); | ||
260 | top->state.connected_CORE = GNUNET_YES; | 260 | top->state.connected_CORE = GNUNET_YES; |
261 | /* Notify about setup done */ | 261 | /* Notify about setup done */ |
262 | if (NULL != top->done_cb) | 262 | if (NULL != top->done_cb) |
diff --git a/src/ats-tests/ats-testing.h b/src/ats-tests/ats-testing.h index f0770d6ae..74da0f78c 100644 --- a/src/ats-tests/ats-testing.h +++ b/src/ats-tests/ats-testing.h | |||
@@ -591,12 +591,13 @@ GNUNET_ATS_TEST_traffic_handle_pong (struct BenchmarkPartner *p); | |||
591 | */ | 591 | */ |
592 | struct TrafficGenerator * | 592 | struct TrafficGenerator * |
593 | GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, | 593 | GNUNET_ATS_TEST_generate_traffic_start (struct BenchmarkPeer *src, |
594 | struct BenchmarkPartner *dest, | 594 | struct BenchmarkPartner *dest, |
595 | enum GeneratorType type, | 595 | enum GeneratorType type, |
596 | long int base_rate, | 596 | unsigned int base_rate, |
597 | long int max_rate, | 597 | unsigned int max_rate, |
598 | struct GNUNET_TIME_Relative period, | 598 | struct GNUNET_TIME_Relative period, |
599 | struct GNUNET_TIME_Relative duration); | 599 | struct GNUNET_TIME_Relative duration); |
600 | |||
600 | 601 | ||
601 | void | 602 | void |
602 | GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg); | 603 | GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg); |
@@ -623,13 +624,13 @@ GNUNET_ATS_TEST_generate_traffic_stop_all (); | |||
623 | */ | 624 | */ |
624 | struct PreferenceGenerator * | 625 | struct PreferenceGenerator * |
625 | GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src, | 626 | GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src, |
626 | struct BenchmarkPartner *dest, | 627 | struct BenchmarkPartner *dest, |
627 | enum GeneratorType type, | 628 | enum GeneratorType type, |
628 | long int base_value, | 629 | unsigned int base_value, |
629 | long int value_rate, | 630 | unsigned int value_rate, |
630 | struct GNUNET_TIME_Relative period, | 631 | struct GNUNET_TIME_Relative period, |
631 | struct GNUNET_TIME_Relative frequency, | 632 | struct GNUNET_TIME_Relative frequency, |
632 | enum GNUNET_ATS_PreferenceKind kind); | 633 | enum GNUNET_ATS_PreferenceKind kind); |
633 | 634 | ||
634 | void | 635 | void |
635 | GNUNET_ATS_TEST_generate_preferences_stop (struct PreferenceGenerator *pg); | 636 | GNUNET_ATS_TEST_generate_preferences_stop (struct PreferenceGenerator *pg); |