aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorChristian Riesch <christian.riesch@omicron.at>2014-03-26 03:16:03 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-27 14:51:47 -0400
commit4ec54f95736f2d90e4d9e4fcc75cf1228f0f3ede (patch)
treeb0d37febb9f055d66d6b49bc661c4823c099b0be /Documentation
parent031fe792ccd4f5d79415b219c73b868da98d9b70 (diff)
ptp: Fix compiler warnings in the testptp utility
Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Dong Zhu <bluezhudong@gmail.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ptp/testptp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c
index 13bddd5427bd..f1ac2dae999e 100644
--- a/Documentation/ptp/testptp.c
+++ b/Documentation/ptp/testptp.c
@@ -19,6 +19,7 @@
19 */ 19 */
20#include <errno.h> 20#include <errno.h>
21#include <fcntl.h> 21#include <fcntl.h>
22#include <inttypes.h>
22#include <math.h> 23#include <math.h>
23#include <signal.h> 24#include <signal.h>
24#include <stdio.h> 25#include <stdio.h>
@@ -496,14 +497,14 @@ int main(int argc, char *argv[])
496 interval = t2 - t1; 497 interval = t2 - t1;
497 offset = (t2 + t1) / 2 - tp; 498 offset = (t2 + t1) / 2 - tp;
498 499
499 printf("system time: %ld.%ld\n", 500 printf("system time: %" PRId64 ".%u\n",
500 (pct+2*i)->sec, (pct+2*i)->nsec); 501 (pct+2*i)->sec, (pct+2*i)->nsec);
501 printf("phc time: %ld.%ld\n", 502 printf("phc time: %" PRId64 ".%u\n",
502 (pct+2*i+1)->sec, (pct+2*i+1)->nsec); 503 (pct+2*i+1)->sec, (pct+2*i+1)->nsec);
503 printf("system time: %ld.%ld\n", 504 printf("system time: %" PRId64 ".%u\n",
504 (pct+2*i+2)->sec, (pct+2*i+2)->nsec); 505 (pct+2*i+2)->sec, (pct+2*i+2)->nsec);
505 printf("system/phc clock time offset is %ld ns\n" 506 printf("system/phc clock time offset is %" PRId64 " ns\n"
506 "system clock time delay is %ld ns\n", 507 "system clock time delay is %" PRId64 " ns\n",
507 offset, interval); 508 offset, interval);
508 } 509 }
509 510