[PATCH 7/9] BZ #17732: Replace %ld with %jd and cast to intmax_t
H.J. Lu
hongjiu.lu@intel.com
Fri Dec 19 22:16:00 GMT 2014
OK to install?
H.J.
---
ChangeLog | 1 +
sysdeps/pthread/tst-timer.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c85da35..a6348e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,7 @@
(do_test): Likewise.
* stdio-common/tst-fmemopen2.c (do_test): Replace %ld with %jd
and cast to intmax_t.
+ * sysdeps/pthread/tst-timer.c (main): Likewise.
2014-12-19 H.J. Lu <hongjiu.lu@intel.com>
diff --git a/sysdeps/pthread/tst-timer.c b/sysdeps/pthread/tst-timer.c
index 16adf3c..f310f6e 100644
--- a/sysdeps/pthread/tst-timer.c
+++ b/sysdeps/pthread/tst-timer.c
@@ -90,13 +90,13 @@ main (void)
setvbuf (stdout, 0, _IOLBF, 0);
- printf ("clock_gettime returned %d, timespec = { %ld, %ld }\n",
- retval, ts.tv_sec, ts.tv_nsec);
+ printf ("clock_gettime returned %d, timespec = { %jd, %jd }\n",
+ retval, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec);
retval = clock_getres (CLOCK_REALTIME, &ts);
- printf ("clock_getres returned %d, timespec = { %ld, %ld }\n",
- retval, ts.tv_sec, ts.tv_nsec);
+ printf ("clock_getres returned %d, timespec = { %jd, %jd }\n",
+ retval, (intmax_t) ts.tv_sec, (intmax_t) ts.tv_nsec);
if (timer_create (CLOCK_REALTIME, &sigev1, &timer_sig) != 0)
{
--
1.9.3
More information about the Libc-alpha
mailing list