aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-12-19 14:02:58 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-12-30 08:09:06 -0800
commit37f469007dd6420bdc0607d0cda63513c42305d9 (patch)
treef7075ed4528df6100d66a2b9cce25797d8aaca5c
parentad86fbc3d5e4bab709d162f40e5d1a19ab8f3f6b (diff)
downloadglibc-37f469007dd6420bdc0607d0cda63513c42305d9.zip
glibc-37f469007dd6420bdc0607d0cda63513c42305d9.tar.gz
glibc-37f469007dd6420bdc0607d0cda63513c42305d9.tar.bz2
Replace %ld with %jd and cast to intmax_t
-rw-r--r--ChangeLog1
-rw-r--r--sysdeps/pthread/tst-timer.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b3d16af..0eaa39d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,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-30 Andrew Senkevich <andrew.senkevich@intel.com>
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)
{