This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/9] BZ #17732: Replace %ld with %jd and cast to intmax_t


OK to install?


H.J.
---
 ChangeLog       |  6 ++++++
 io/test-utime.c | 12 ++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3cef094..8c3fb68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,12 @@
 
 2014-12-19  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-19  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/x86_64/x32/Makefile (CFLAGS-s_llround.c): Replace
 	-Wno-error with -fno-builtin-lround.
 
diff --git a/io/test-utime.c b/io/test-utime.c
index 26a5464..afb8a29 100644
--- a/io/test-utime.c
+++ b/io/test-utime.c
@@ -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;
     }
 
-- 
1.9.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]