From e8cf81fdb3fdaef59b49da8f6e952a3225ab326e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 6 May 2016 14:44:08 +0000 Subject: fixing compiler warnings --- src/transport/gnunet-service-transport.c | 8 +++---- .../gnunet-service-transport_manipulation.c | 2 +- .../gnunet-service-transport_neighbours.c | 28 ++++++++++------------ src/transport/transport_api_address_to_string.c | 2 +- 4 files changed, 18 insertions(+), 22 deletions(-) (limited to 'src/transport') diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 119e5e564..14eefdfb3 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -224,7 +224,7 @@ process_payload (const struct GNUNET_HELLO_Address *address, { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Discarded %u bytes type %u payload from peer `%s'\n", - msg_size, + (unsigned int) msg_size, ntohs (message->type), GNUNET_i2s (&address->peer)); GNUNET_STATISTICS_update (GST_stats, gettext_noop @@ -866,9 +866,9 @@ run (void *cls, { max_fd_rlimit = r_file.rlim_cur; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Maximum number of open files was: %u/%u\n", - r_file.rlim_cur, - r_file.rlim_max); + "Maximum number of open files was: %u/%u\n", + (unsigned int) r_file.rlim_cur, + (unsigned int) r_file.rlim_max); } max_fd_rlimit = (9 * max_fd_rlimit) / 10; /* Keep 10% for rest of transport */ #endif diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c index bd3fed6d7..7620cdbb1 100644 --- a/src/transport/gnunet-service-transport_manipulation.c +++ b/src/transport/gnunet-service-transport_manipulation.c @@ -350,7 +350,7 @@ GST_manipulation_send (const struct GNUNET_PeerIdentity *target, } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Delaying %u byte message to peer `%s' with peer specific delay for %s\n", - msg_size, + (unsigned int) msg_size, GNUNET_i2s (target), GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 65428ef2a..9d1c9459e 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -1296,12 +1296,12 @@ transmit_send_continuation (void *cls, if (bytes_in_send_queue < mq->message_buf_size) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Bytes_in_send_queue `%u', Message_size %u, result: %s, payload %u, on wire %u\n", + "Bytes_in_send_queue `%llu', Message_size %u, result: %s, payload %u, on wire %u\n", bytes_in_send_queue, - mq->message_buf_size, + (unsigned int) mq->message_buf_size, (GNUNET_OK == success) ? "OK" : "FAIL", - size_payload, - physical); + (unsigned int) size_payload, + (unsigned int) physical); GNUNET_break (0); } @@ -1325,7 +1325,7 @@ transmit_send_continuation (void *cls, "Sending message to `%s' of type %u with %u bytes was a %s\n", GNUNET_i2s (receiver), ntohs (((struct GNUNET_MessageHeader *) mq->message_buf)->type), - mq->message_buf_size, + (unsigned int) mq->message_buf_size, (success == GNUNET_OK) ? "success" : "FAILURE"); if (NULL != mq->cont) mq->cont (mq->cont_cls, @@ -1401,7 +1401,7 @@ try_transmission_to_peer (struct NeighbourMapEntry *n) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Giving message with %u bytes to plugin session %p\n", - mq->message_buf_size, + (unsigned int) mq->message_buf_size, n->primary_address.session); (void) send_with_session (n, mq->message_buf, @@ -1773,7 +1773,7 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Enqueueing %u bytes to send to peer %s\n", - msg_size, + (unsigned int) msg_size, GNUNET_i2s (target)); GNUNET_CONTAINER_DLL_insert_tail (n->messages_head, n->messages_tail, @@ -2117,7 +2117,7 @@ inbound_bw_tracker_update (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "New inbound delay for peer `%s' is %llu ms\n", GNUNET_i2s (&n->id), - delay.rel_value_us / 1000); + (unsigned long long) delay.rel_value_us / 1000LL); papi->update_inbound_delay (papi->cls, &n->id, n->primary_address.session, @@ -3244,11 +3244,9 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, /* The session used to send the SYN terminated: * this implies a connect error*/ GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Failed to send SYN in %s with `%s' %p: session terminated\n", - "CONNECT_SENT", + "Failed to send SYN in CONNECT_SENT with `%s' %p: session terminated\n", GST_plugins_a2s (n->primary_address.address), - n->primary_address.session, - GNUNET_i2s (peer)); + n->primary_address.session); /* Destroy the address since it cannot be used */ unset_primary_address (n); @@ -3274,11 +3272,9 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, break; case GNUNET_TRANSPORT_PS_RECONNECT_SENT: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Failed to send SYN in %s with `%s' %p: session terminated\n", - "RECONNECT_SENT", + "Failed to send SYN in RECONNECT_SENT with `%s' %p: session terminated\n", GST_plugins_a2s (n->primary_address.address), - n->primary_address.session, - GNUNET_i2s (peer)); + n->primary_address.session); /* Destroy the address since it cannot be used */ unset_primary_address (n); set_state_and_timeout (n, diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c index 2220790be..2b8b426c7 100644 --- a/src/transport/transport_api_address_to_string.c +++ b/src/transport/transport_api_address_to_string.c @@ -203,7 +203,7 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cf client, GNUNET_i2s (&address->peer), address->transport_name, - address->address_length); + (unsigned int) address->address_length); msg = GNUNET_malloc (len); msg->header.size = htons (len); -- cgit v1.2.3