summaryrefslogtreecommitdiff
path: root/Documentation/networking/timestamping
diff options
context:
space:
mode:
authorFrans Klaver <fransklaver@gmail.com>2015-06-04 22:27:38 +0300
committerJonathan Corbet <corbet@lwn.net>2015-06-05 01:59:10 +0300
commit03e8f01a67d6fc02fafc1b23394cc750fec290e1 (patch)
tree88d13e77acd9310fb224ec79a1c7c01dbf500fea /Documentation/networking/timestamping
parent1df1b3618d95f7a6668c1a8e749e1be96a7e3fe1 (diff)
downloadlinux-03e8f01a67d6fc02fafc1b23394cc750fec290e1.tar.xz
Doc: networking: txtimestamp: fix printf format warning
Documentation/networking/timestamping/txtimestamp.c: In function ‘__print_timestamp’: Documentation/networking/timestamping/txtimestamp.c:99:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Wformat=] fprintf(stderr, " (%+ld us)", cur_ms - prev_ms); int64_t differs per platform, so a type specifier that differs along with it is required. Signed-off-by: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/networking/timestamping')
-rw-r--r--Documentation/networking/timestamping/txtimestamp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/networking/timestamping/txtimestamp.c b/Documentation/networking/timestamping/txtimestamp.c
index 8217510d3842..5df07047ca86 100644
--- a/Documentation/networking/timestamping/txtimestamp.c
+++ b/Documentation/networking/timestamping/txtimestamp.c
@@ -36,6 +36,7 @@
#include <asm/types.h>
#include <error.h>
#include <errno.h>
+#include <inttypes.h>
#include <linux/errqueue.h>
#include <linux/if_ether.h>
#include <linux/net_tstamp.h>
@@ -49,7 +50,6 @@
#include <poll.h>
#include <stdarg.h>
#include <stdbool.h>
-#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -96,7 +96,7 @@ static void __print_timestamp(const char *name, struct timespec *cur,
prev_ms = (long) ts_prev.tv_sec * 1000 * 1000;
prev_ms += ts_prev.tv_nsec / 1000;
- fprintf(stderr, " (%+ld us)", cur_ms - prev_ms);
+ fprintf(stderr, " (%+" PRId64 " us)", cur_ms - prev_ms);
}
ts_prev = *cur;