]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Replace %ld with %jd and cast to intmax_t
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 19 Dec 2014 22:04:35 +0000 (14:04 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 30 Dec 2014 16:09:43 +0000 (08:09 -0800)
ChangeLog
time/clocktest.c
time/tst-posixtz.c

index 0eaa39d5b64bb430608fe240b1f62e429c56c12a..a228b9e623e5586408b2888df894876155a6b571 100644 (file)
--- 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>
index f2b3ea73a15fe35d9fb63ed24753f4397d3d2066..2e6457d56a6b74e7eb180353515a6c6fa15a5d17 100644 (file)
@@ -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;
index c1ea267cb4c3ce05cb858182aa24cb65b588273e..16aa19d65488c8c5354865112a321cc85725c639 100644 (file)
@@ -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);