Browse Source

Fix format strings on 64 bit machine.

Georgi Chorbadzhiyski 9 years ago
parent
commit
6aae193a13
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      output_write.c

+ 3
- 2
output_write.c View File

21
 #include <sys/time.h>
21
 #include <sys/time.h>
22
 #include <errno.h>
22
 #include <errno.h>
23
 #include <math.h>
23
 #include <math.h>
24
+#include <inttypes.h>
24
 
25
 
25
 #include "libfuncs/io.h"
26
 #include "libfuncs/io.h"
26
 #include "libfuncs/log.h"
27
 #include "libfuncs/log.h"
75
 					if (conf->debug) {
76
 					if (conf->debug) {
76
 						uint64_t ts_rate = (double)(((bytes - old_bytes) * 8) * 27000000) / (pcr - old_org_pcr);
77
 						uint64_t ts_rate = (double)(((bytes - old_bytes) * 8) * 27000000) / (pcr - old_org_pcr);
77
 						uint64_t ts_rate_new = (double)(((bytes - old_bytes) * 8) * 27000000) / (new_pcr - old_pcr);
78
 						uint64_t ts_rate_new = (double)(((bytes - old_bytes) * 8) * 27000000) / (new_pcr - old_pcr);
78
-						LOGf("PCR[%03x]: old:%14llu new:%14llu pcr_diff:%8lld ts_rate:%9llu ts_rate_new:%9llu diff:%9lld | passed:%llu\n",
79
+						LOGf("PCR[%03x]: old:%14" PRIu64 " new:%14" PRIu64 " pcr_diff:%8" PRId64 " ts_rate:%9" PRIu64 " ts_rate_new:%9" PRIu64 " diff:%9" PRId64 " | passed:%" PRIu64 "\n",
79
 							pid,
80
 							pid,
80
 							pcr,
81
 							pcr,
81
 							new_pcr,
82
 							new_pcr,
147
 			double opadding = ((double)o->padding_period / o->traffic_period) * 100;
148
 			double opadding = ((double)o->padding_period / o->traffic_period) * 100;
148
 
149
 
149
 			if (!conf->quiet) {
150
 			if (!conf->quiet) {
150
-				LOGf("STAT  : Pad:%6.2f%% Traf:%5.2f Mbps | %8.2f | %7llu\n",
151
+				LOGf("STAT  : Pad:%6.2f%% Traf:%5.2f Mbps | %8.2f | %7" PRIu64 "\n",
151
 					opadding,
152
 					opadding,
152
 					out_mbps,
153
 					out_mbps,
153
 					out_kbps,
154
 					out_kbps,

Loading…
Cancel
Save