Replace %ld with %jd and cast to intmax_t
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 19 Dec 2014 21:48:40 +0000 (13:48 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 30 Dec 2014 16:04:43 +0000 (08:04 -0800)
ChangeLog
io/test-utime.c

index 3125219..b972232 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #17732]
+       * io/test-utime.c (main): Replace %ld with %jd and cast to
+       intmax_t.
+
 2014-12-30  Andrew Senkevich  <andrew.senkevich@intel.com>
            H.J. Lu  <hongjiu.lu@intel.com>
 
index 26a5464..afb8a29 100644 (file)
@@ -109,25 +109,29 @@ main (int argc, char *argv[])
 
   if (st.st_mtime != ut.modtime)
     {
-      printf ("modtime %ld != %ld\n", st.st_mtime, ut.modtime);
+      printf ("modtime %jd != %jd\n",
+             (intmax_t) st.st_mtime, (intmax_t) ut.modtime);
       return 1;
     }
 
   if (st.st_atime != ut.actime)
     {
-      printf ("actime %ld != %ld\n", st.st_atime, ut.actime);
+      printf ("actime %jd != %jd\n",
+             (intmax_t) st.st_atime, (intmax_t) ut.actime);
       return 1;
     }
 
   if (stnow.st_mtime < now1 || stnow.st_mtime > now2)
     {
-      printf ("modtime %ld <%ld >%ld\n", stnow.st_mtime, now1, now2);
+      printf ("modtime %jd <%jd >%jd\n",
+             (intmax_t) stnow.st_mtime, (intmax_t) now1, (intmax_t) now2);
       return 1;
     }
 
   if (stnow.st_atime < now1 || stnow.st_atime > now2)
     {
-      printf ("actime %ld <%ld >%ld\n", stnow.st_atime, now1, now2);
+      printf ("actime %jd <%jd >%jd\n",
+             (intmax_t) stnow.st_atime, (intmax_t) now1, (intmax_t) now2);
       return 1;
     }