From b0aff8490a958c0f8c68c27b6479dcde36fe3ec9 Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Mon, 5 Jun 2017 10:57:07 -0700 Subject: [PATCH] Fix a few printf format string warnings seen on macOS / clang. (#593) --- src/iperf_tcp.c | 2 +- src/iperf_udp.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c index 2c1a7dc..91cf032 100644 --- a/src/iperf_tcp.c +++ b/src/iperf_tcp.c @@ -90,7 +90,7 @@ iperf_tcp_send(struct iperf_stream *sp) sp->result->bytes_sent_this_interval += r; if (sp->test->debug) - printf("sent %d bytes of %d, total %lu\n", r, sp->settings->blksize, sp->result->bytes_sent); + printf("sent %d bytes of %d, total %llu\n", r, sp->settings->blksize, sp->result->bytes_sent); return r; } diff --git a/src/iperf_udp.c b/src/iperf_udp.c index ca275d9..a2ea6d0 100644 --- a/src/iperf_udp.c +++ b/src/iperf_udp.c @@ -98,7 +98,7 @@ iperf_udp_recv(struct iperf_stream *sp) } if (sp->test->debug) - fprintf(stderr, "pcount %zu packet_count %d\n", pcount, sp->packet_count); + fprintf(stderr, "pcount %llu packet_count %d\n", pcount, sp->packet_count); /* * Try to handle out of order packets. The way we do this @@ -141,7 +141,7 @@ iperf_udp_recv(struct iperf_stream *sp) /* Log the out-of-order packet */ if (sp->test->debug) - fprintf(stderr, "OUT OF ORDER - incoming packet sequence %zu but expected sequence %d on stream %d", pcount, sp->packet_count, sp->socket); + fprintf(stderr, "OUT OF ORDER - incoming packet sequence %llu but expected sequence %d on stream %d", pcount, sp->packet_count, sp->socket); } /* @@ -220,7 +220,7 @@ iperf_udp_send(struct iperf_stream *sp) sp->result->bytes_sent_this_interval += r; if (sp->test->debug) - printf("sent %d bytes of %d, total %lu\n", r, sp->settings->blksize, sp->result->bytes_sent); + printf("sent %d bytes of %d, total %llu\n", r, sp->settings->blksize, sp->result->bytes_sent); return r; }