From: David Schweikert Date: Wed, 29 Jul 2020 16:00:19 +0000 (+0200) Subject: fix compiler warning X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fec099871c9788a7a91fb40e2f0dc43905d462da;p=fping.git fix compiler warning --- diff --git a/src/fping.c b/src/fping.c index 131e76a..8173404 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1579,7 +1579,8 @@ void print_netdata(void) { static int sent_charts = 0; - int i, avg; + int i; + int64_t avg; HOST_ENTRY* h; for (i = 0; i < num_hosts; i++) { @@ -1623,9 +1624,9 @@ void print_netdata(void) printf("BEGIN fping.%s_latency\n", h->name); if (h->num_recv_i) { avg = h->total_time_i / h->num_recv_i; - printf("SET min = %d\n", h->min_reply_i); - printf("SET avg = %d\n", avg); - printf("SET max = %d\n", h->max_reply_i); + printf("SET min = %ld\n", h->min_reply_i); + printf("SET avg = %ld\n", avg); + printf("SET max = %ld\n", h->max_reply_i); } printf("END\n");