diff options
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/test_plugin_transport.c | 7 | ||||
-rw-r--r-- | src/transport/test_transport_api_limited_sockets.c | 11 | ||||
-rw-r--r-- | src/transport/test_transport_api_reliability.c | 11 |
3 files changed, 18 insertions, 11 deletions
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index e75cb7c7f..61ea2035f 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c | |||
@@ -380,7 +380,8 @@ test_addr_string (void *cls) | |||
380 | { | 380 | { |
381 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 381 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
382 | "Plugin creates different address length when converting address->string->address: %u != %u\n", | 382 | "Plugin creates different address length when converting address->string->address: %u != %u\n", |
383 | w->address->address_length, s2a_len); | 383 | (unsigned int) w->address->address_length, |
384 | s2a_len); | ||
384 | } | 385 | } |
385 | else if (0 != memcmp (s2a, w->address->address, s2a_len)) | 386 | else if (0 != memcmp (s2a, w->address->address, s2a_len)) |
386 | { | 387 | { |
@@ -439,7 +440,7 @@ env_notify_address (void *cls, | |||
439 | addresses_reported++; | 440 | addresses_reported++; |
440 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 441 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
441 | "Adding address of length %u\n", | 442 | "Adding address of length %u\n", |
442 | address->address_length); | 443 | (unsigned int) address->address_length); |
443 | 444 | ||
444 | for (wtmp = head; NULL != wtmp; wtmp = wtmp->next) | 445 | for (wtmp = head; NULL != wtmp; wtmp = wtmp->next) |
445 | { | 446 | { |
@@ -465,7 +466,7 @@ env_notify_address (void *cls, | |||
465 | { | 466 | { |
466 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
467 | "Removing address of length %u\n", | 468 | "Removing address of length %u\n", |
468 | address->address_length); | 469 | (unsigned int) address->address_length); |
469 | w = head; | 470 | w = head; |
470 | while (NULL != w) | 471 | while (NULL != w) |
471 | { | 472 | { |
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index 0ae807077..1a04ad6fe 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c | |||
@@ -163,7 +163,8 @@ notify_ready (void *cls, size_t size, void *buf) | |||
163 | 163 | ||
164 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 164 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
165 | "Transmitting message with %u bytes to peer %s\n", | 165 | "Transmitting message with %u bytes to peer %s\n", |
166 | sizeof (struct GNUNET_MessageHeader), GNUNET_i2s (&p->id)); | 166 | (unsigned int) sizeof (struct GNUNET_MessageHeader), |
167 | GNUNET_i2s (&p->id)); | ||
167 | GNUNET_assert (size >= 256); | 168 | GNUNET_assert (size >= 256); |
168 | 169 | ||
169 | if (buf != NULL) | 170 | if (buf != NULL) |
@@ -308,10 +309,12 @@ main (int argc, char *argv[]) | |||
308 | 309 | ||
309 | res = getrlimit (RLIMIT_NOFILE, &r_file_old); | 310 | res = getrlimit (RLIMIT_NOFILE, &r_file_old); |
310 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 311 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
311 | "Maximum number of open files was: %u/%u\n", r_file_old.rlim_cur, | 312 | "Maximum number of open files was: %u/%u\n", |
312 | r_file_old.rlim_max); | 313 | (unsigned int) r_file_old.rlim_cur, |
314 | (unsigned int) r_file_old.rlim_max); | ||
313 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 315 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
314 | "Setting maximum number of open files to: %u\n", MAX_FILES); | 316 | "Setting maximum number of open files to: %u\n", |
317 | MAX_FILES); | ||
315 | r_file_new.rlim_cur = MAX_FILES; | 318 | r_file_new.rlim_cur = MAX_FILES; |
316 | r_file_new.rlim_max = r_file_old.rlim_max; | 319 | r_file_new.rlim_max = r_file_old.rlim_max; |
317 | res = setrlimit (RLIMIT_NOFILE, &r_file_new); | 320 | res = setrlimit (RLIMIT_NOFILE, &r_file_new); |
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index cc2115a48..fe2ac78e0 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c | |||
@@ -318,8 +318,9 @@ set_bit (unsigned int bitIdx) | |||
318 | if (bitIdx >= sizeof (bitmap) * 8) | 318 | if (bitIdx >= sizeof (bitmap) * 8) |
319 | { | 319 | { |
320 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 320 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
321 | "tried to set bit %d of %d(!?!?)\n", | 321 | "tried to set bit %u of %u(!?!?)\n", |
322 | bitIdx, sizeof (bitmap) * 8); | 322 | bitIdx, |
323 | (unsigned int) sizeof (bitmap) * 8); | ||
323 | return GNUNET_SYSERR; | 324 | return GNUNET_SYSERR; |
324 | } | 325 | } |
325 | arraySlot = bitIdx / 8; | 326 | arraySlot = bitIdx / 8; |
@@ -341,8 +342,10 @@ get_bit (const char *map, unsigned int bit) | |||
341 | { | 342 | { |
342 | if (bit > TOTAL_MSGS) | 343 | if (bit > TOTAL_MSGS) |
343 | { | 344 | { |
344 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "get bit %d of %d(!?!?)\n", bit, | 345 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
345 | sizeof (bitmap) * 8); | 346 | "get bit %u of %u(!?!?)\n", |
347 | bit, | ||
348 | (unsigned int) sizeof (bitmap) * 8); | ||
346 | return 0; | 349 | return 0; |
347 | } | 350 | } |
348 | return ((map)[bit >> 3] & (1 << (bit & 7))) > 0; | 351 | return ((map)[bit >> 3] & (1 << (bit & 7))) > 0; |