Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replace %ld with %jd and cast to intmax_t
  • Loading branch information
H.J. Lu committed Dec 30, 2014
1 parent ad86fbc commit 37f4690
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -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>
Expand Down
8 changes: 4 additions & 4 deletions sysdeps/pthread/tst-timer.c
Expand Up @@ -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)
{
Expand Down

0 comments on commit 37f4690

Please sign in to comment.