summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-06 15:01:44 +0000
committerChristian Grothoff <christian@grothoff.org>2016-05-06 15:01:44 +0000
commit221996eb735384bb5478819e4358d2c648a16d7b (patch)
treefa8049781525b35c0689ddaf89792e60416bcff7 /src/transport
parent34aad61f423d2f6078ecfe51cb7a650fe528ab96 (diff)
fix compiler warnings
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/test_plugin_transport.c7
-rw-r--r--src/transport/test_transport_api_limited_sockets.c11
-rw-r--r--src/transport/test_transport_api_reliability.c11
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)
{
GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
"Plugin creates different address length when converting address->string->address: %u != %u\n",
- w->address->address_length, s2a_len);
+ (unsigned int) w->address->address_length,
+ s2a_len);
}
else if (0 != memcmp (s2a, w->address->address, s2a_len))
{
@@ -439,7 +440,7 @@ env_notify_address (void *cls,
addresses_reported++;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Adding address of length %u\n",
- address->address_length);
+ (unsigned int) address->address_length);
for (wtmp = head; NULL != wtmp; wtmp = wtmp->next)
{
@@ -465,7 +466,7 @@ env_notify_address (void *cls,
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Removing address of length %u\n",
- address->address_length);
+ (unsigned int) address->address_length);
w = head;
while (NULL != w)
{
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)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Transmitting message with %u bytes to peer %s\n",
- sizeof (struct GNUNET_MessageHeader), GNUNET_i2s (&p->id));
+ (unsigned int) sizeof (struct GNUNET_MessageHeader),
+ GNUNET_i2s (&p->id));
GNUNET_assert (size >= 256);
if (buf != NULL)
@@ -308,10 +309,12 @@ main (int argc, char *argv[])
res = getrlimit (RLIMIT_NOFILE, &r_file_old);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Maximum number of open files was: %u/%u\n", r_file_old.rlim_cur,
- r_file_old.rlim_max);
+ "Maximum number of open files was: %u/%u\n",
+ (unsigned int) r_file_old.rlim_cur,
+ (unsigned int) r_file_old.rlim_max);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Setting maximum number of open files to: %u\n", MAX_FILES);
+ "Setting maximum number of open files to: %u\n",
+ MAX_FILES);
r_file_new.rlim_cur = MAX_FILES;
r_file_new.rlim_max = r_file_old.rlim_max;
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)
if (bitIdx >= sizeof (bitmap) * 8)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "tried to set bit %d of %d(!?!?)\n",
- bitIdx, sizeof (bitmap) * 8);
+ "tried to set bit %u of %u(!?!?)\n",
+ bitIdx,
+ (unsigned int) sizeof (bitmap) * 8);
return GNUNET_SYSERR;
}
arraySlot = bitIdx / 8;
@@ -341,8 +342,10 @@ get_bit (const char *map, unsigned int bit)
{
if (bit > TOTAL_MSGS)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "get bit %d of %d(!?!?)\n", bit,
- sizeof (bitmap) * 8);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "get bit %u of %u(!?!?)\n",
+ bit,
+ (unsigned int) sizeof (bitmap) * 8);
return 0;
}
return ((map)[bit >> 3] & (1 << (bit & 7))) > 0;