about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-12-19 14:04:35 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-12-30 08:09:43 -0800
commitfe342f50136919f1945d9a03964ee614c97d8659 (patch)
treead85cb04084740b896e5ab476c6f1df5d7ac36f0
parent37f469007dd6420bdc0607d0cda63513c42305d9 (diff)
downloadglibc-fe342f50136919f1945d9a03964ee614c97d8659.tar.gz
glibc-fe342f50136919f1945d9a03964ee614c97d8659.tar.xz
glibc-fe342f50136919f1945d9a03964ee614c97d8659.zip
Replace %ld with %jd and cast to intmax_t
-rw-r--r--ChangeLog2
-rw-r--r--time/clocktest.c4
-rw-r--r--time/tst-posixtz.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0eaa39d5b6..a228b9e623 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,8 @@
 	* stdio-common/tst-fmemopen2.c (do_test): Replace %ld with %jd
 	and cast to intmax_t.
 	* sysdeps/pthread/tst-timer.c (main): Likewise.
+	* time/clocktest.c (main): Likewise.
+	* time/tst-posixtz.c (do_test): Likewise.
 
 2014-12-30  Andrew Senkevich  <andrew.senkevich@intel.com>
 	    H.J. Lu  <hongjiu.lu@intel.com>
diff --git a/time/clocktest.c b/time/clocktest.c
index f2b3ea73a1..2e6457d56a 100644
--- a/time/clocktest.c
+++ b/time/clocktest.c
@@ -28,8 +28,8 @@ main (int argc, char ** argv)
   while (!gotit);
   stop = clock ();
 
-  printf ("%ld clock ticks per second (start=%ld,stop=%ld)\n",
-	  stop - start, start, stop);
+  printf ("%jd clock ticks per second (start=%jd,stop=%jd)\n",
+	  (intmax_t) (stop - start), (intmax_t) start, (intmax_t) stop);
   printf ("CLOCKS_PER_SEC=%ld, sysconf(_SC_CLK_TCK)=%ld\n",
 	  CLOCKS_PER_SEC, sysconf(_SC_CLK_TCK));
   return 0;
diff --git a/time/tst-posixtz.c b/time/tst-posixtz.c
index c1ea267cb4..16aa19d654 100644
--- a/time/tst-posixtz.c
+++ b/time/tst-posixtz.c
@@ -39,7 +39,8 @@ do_test (void)
       char buf[100];
       struct tm *tmp;
 
-      printf ("TZ = \"%s\", time = %ld => ", tests[cnt].tz, tests[cnt].when);
+      printf ("TZ = \"%s\", time = %jd => ", tests[cnt].tz,
+	      (intmax_t) tests[cnt].when);
       fflush (stdout);
 
       setenv ("TZ", tests[cnt].tz, 1);