From: Christian Riesch <christian.riesch@omicron.at>
To: <netdev@vger.kernel.org>
Cc: Richard Cochran <richardcochran@gmail.com>,
Christian Riesch <christian.riesch@omicron.at>,
Dong Zhu <bluezhudong@gmail.com>
Subject: [PATCH v2 net-next 2/2] ptp: Fix compiler warnings in the testptp utility
Date: Wed, 26 Mar 2014 08:16:03 +0100 [thread overview]
Message-ID: <35ec3d13-e8a8-4cf4-b5ce-91c4dbe2ac0b@mary.at.omicron.at> (raw)
In-Reply-To: <1395818163-31672-1-git-send-email-christian.riesch@omicron.at>
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Dong Zhu <bluezhudong@gmail.com>
---
Changes for v2:
- Use PRI64d macro for __s64 in printf
Documentation/ptp/testptp.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c
index 13bddd5..f1ac2da 100644
--- a/Documentation/ptp/testptp.c
+++ b/Documentation/ptp/testptp.c
@@ -19,6 +19,7 @@
*/
#include <errno.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <math.h>
#include <signal.h>
#include <stdio.h>
@@ -496,14 +497,14 @@ int main(int argc, char *argv[])
interval = t2 - t1;
offset = (t2 + t1) / 2 - tp;
- printf("system time: %ld.%ld\n",
+ printf("system time: %" PRId64 ".%u\n",
(pct+2*i)->sec, (pct+2*i)->nsec);
- printf("phc time: %ld.%ld\n",
+ printf("phc time: %" PRId64 ".%u\n",
(pct+2*i+1)->sec, (pct+2*i+1)->nsec);
- printf("system time: %ld.%ld\n",
+ printf("system time: %" PRId64 ".%u\n",
(pct+2*i+2)->sec, (pct+2*i+2)->nsec);
- printf("system/phc clock time offset is %ld ns\n"
- "system clock time delay is %ld ns\n",
+ printf("system/phc clock time offset is %" PRId64 " ns\n"
+ "system clock time delay is %" PRId64 " ns\n",
offset, interval);
}
--
1.7.9.5
next parent reply other threads:[~2014-03-26 7:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1395818163-31672-1-git-send-email-christian.riesch@omicron.at>
2014-03-26 7:16 ` Christian Riesch [this message]
2014-03-26 9:16 ` [PATCH v2 net-next 2/2] ptp: Fix compiler warnings in the testptp utility Richard Cochran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35ec3d13-e8a8-4cf4-b5ce-91c4dbe2ac0b@mary.at.omicron.at \
--to=christian.riesch@omicron.at \
--cc=bluezhudong@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox