diff --git a/src/iperf_api.c b/src/iperf_api.c index daa157cac..dafbadf65 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -2085,14 +2085,14 @@ int test_is_authorized(struct iperf_test *test){ int ret = check_authentication(username, password, ts, test->server_authorized_users, test->server_skew_threshold); if (ret == 0){ if (test->debug) { - iperf_printf(test, report_authentication_succeeded, username, ts); + iperf_printf(test, report_authentication_succeeded, username, (uint64_t)ts); } free(username); free(password); return 0; } else { if (test->debug) { - iperf_printf(test, report_authentication_failed, ret, username, ts); + iperf_printf(test, report_authentication_failed, ret, username, (uint64_t)ts); } free(username); free(password); @@ -3594,7 +3594,7 @@ iperf_print_intermediate(struct iperf_test *test) iperf_size_t bytes = 0; double bandwidth; - int retransmits = 0; + int64_t retransmits = 0; double start_time, end_time; int64_t total_packets = 0, lost_packets = 0; @@ -3670,7 +3670,7 @@ iperf_print_intermediate(struct iperf_test *test) if (test->sender_has_retransmits == 1 && stream_must_be_sender) { /* Interval sum, TCP with retransmits. */ if (test->json_output) - cJSON_AddItemToObject(json_interval, sum_name, iperf_json_printf("start: %f end: %f seconds: %f bytes: %d bits_per_second: %f retransmits: %d omitted: %b sender: %b", (double) start_time, (double) end_time, (double) irp->interval_duration, (int64_t) bytes, bandwidth * 8, (int64_t) retransmits, irp->omitted, stream_must_be_sender)); /* XXX irp->omitted or test->omitting? */ + cJSON_AddItemToObject(json_interval, sum_name, iperf_json_printf("start: %f end: %f seconds: %f bytes: %d bits_per_second: %f retransmits: %d omitted: %b sender: %b", (double) start_time, (double) end_time, (double) irp->interval_duration, (int64_t) bytes, bandwidth * 8, retransmits, irp->omitted, stream_must_be_sender)); /* XXX irp->omitted or test->omitting? */ else iperf_printf(test, report_sum_bw_retrans_format, mbuf, start_time, end_time, ubuf, nbuf, retransmits, irp->omitted?report_omitted:""); /* XXX irp->omitted or test->omitting? */ } else { diff --git a/src/iperf_locale.c b/src/iperf_locale.c index 9d94e0234..cfdba5826 100644 --- a/src/iperf_locale.c +++ b/src/iperf_locale.c @@ -292,10 +292,10 @@ const char test_start_time[] = "Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %d second test, tos %d\n"; const char test_start_bytes[] = -"Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %llu bytes to send, tos %d\n"; +"Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %"PRIuFAST64" bytes to send, tos %d\n"; const char test_start_blocks[] = -"Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %d blocks to send, tos %d\n"; +"Starting Test: protocol: %s, %d streams, %d byte blocks, omitting %d seconds, %"PRIuFAST64" bytes to send, tos %d\n"; /* ------------------------------------------------------------------- @@ -309,10 +309,10 @@ const char report_connecting[] = "Connecting to host %s, port %d\n"; const char report_authentication_succeeded[] = -"Authentication succeeded for user '%s' ts %ld\n"; +"Authentication succeeded for user '%s' ts %" PRIu64 "\n"; const char report_authentication_failed[] = -"Authentication failed with return code %d for user '%s' ts %ld\n"; +"Authentication failed with return code %d for user '%s' ts %" PRIu64 "\n"; const char report_reverse[] = "Reverse mode, remote host %s is sending\n"; @@ -381,10 +381,10 @@ const char report_bw_format[] = "[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %s\n"; const char report_bw_retrans_format[] = -"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %3u %s\n"; +"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %3ld %s\n"; const char report_bw_retrans_cwnd_format[] = -"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %3u %ss %s\n"; +"[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %3ld %ss %s\n"; const char report_bw_udp_format[] = "[%3d]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %" PRId64 "/%" PRId64 " (%.2g%%) %s\n"; @@ -402,7 +402,7 @@ const char report_sum_bw_format[] = "[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %s\n"; const char report_sum_bw_retrans_format[] = -"[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %3d %s\n"; +"[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %3"PRId64" %s\n"; const char report_sum_bw_udp_format[] = "[SUM]%s %6.2f-%-6.2f sec %ss %ss/sec %5.3f ms %" PRId64 "/%" PRId64 " (%.2g%%) %s\n"; @@ -419,7 +419,7 @@ const char report_outoforder[] = "[%3d]%s %4.1f-%4.1f sec %d datagrams received out-of-order\n"; const char report_sum_outoforder[] = -"[SUM]%s %4.1f-%4.1f sec %d datagrams received out-of-order\n"; +"[SUM]%s %4.1f-%4.1f sec %"PRIu64" datagrams received out-of-order\n"; const char report_peer[] = "[%3d] local %s port %u connected with %s port %u\n";