summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2020-11-13 23:46:16 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2020-11-13 23:46:16 +0900
commite19e93df13a84b26db9f129f509ecb74a1b93145 (patch)
tree264e99934d1661e1d83508c3434c5d00e33a6ee1 /src/transport
parentc185348b6784a80bb8b394e34e3bf447d8dd1f57 (diff)
-warnings mostly format
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-helper-transport-wlan.c2
-rw-r--r--src/transport/gnunet-service-transport.c3
-rw-r--r--src/transport/plugin_transport_wlan.c9
3 files changed, 8 insertions, 6 deletions
diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c
index 83ade115b..f1b190993 100644
--- a/src/transport/gnunet-helper-transport-wlan.c
+++ b/src/transport/gnunet-helper-transport-wlan.c
@@ -2004,7 +2004,7 @@ main (int argc, char *argv[])
(void) close (dev.fd_raw);
return 1;
}
- strncpy (dev.iface, argv[1], IFNAMSIZ);
+ memcpy (dev.iface, argv[1], IFNAMSIZ);
if (0 != open_device_raw (&dev))
{
(void) close (dev.fd_raw);
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 92e37a91c..a819d82a5 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -695,12 +695,13 @@ handle_send_transmit_continuation (void *cls,
{
struct SendTransmitContinuationContext *stcc = cls;
struct SendOkMessage send_ok_msg;
+#ifdef ENABLE_TTD
struct GNUNET_TIME_Relative delay;
const struct GNUNET_HELLO_Address *addr;
delay = GNUNET_TIME_absolute_get_duration (stcc->send_time);
addr = GST_neighbour_get_current_address (&stcc->target);
-#ifdef ENABLE_TTD
+
if (delay.rel_value_us > GNUNET_CONSTANTS_LATENCY_WARN.rel_value_us)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"It took us %s to send %u/%u bytes to %s (%d, %s)\n",
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 74b8d5a8a..1b2b6d0d2 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1436,8 +1436,8 @@ wlan_plugin_send (void *cls,
char buf[size] GNUNET_ALIGN;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Transmitting %u bytes of payload to peer `%s' (starting with %u byte message of type %u)\n",
- msgbuf_size,
+ "Transmitting %llu bytes of payload to peer `%s' (starting with %u byte message of type %u)\n",
+ (unsigned long long) msgbuf_size,
GNUNET_i2s (&session->target),
(unsigned int) ntohs (((struct GNUNET_MessageHeader*) msgbuf)->size),
(unsigned int) ntohs (((struct GNUNET_MessageHeader*) msgbuf)->type));
@@ -1871,8 +1871,9 @@ handle_helper_message (void *cls,
if (msize < sizeof(struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage))
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Size of packet is too small (%u bytes < %u)\n",
- msize, sizeof(struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage));
+ "Size of packet is too small (%llu bytes < %llu)\n",
+ (unsigned long long) msize,
+ (unsigned long long) sizeof(struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage));
break;
}
rxinfo = (const struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage *) hdr;