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 3/9] BZ #17732: Replace %ld with %jd and cast to intmax_t


OK to install?

H.J.
---
 ChangeLog         | 2 ++
 nptl/tst-mutex5.c | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9cec358..cb00ebe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,8 @@
 	* io/test-utime.c (main): Replace %ld with %jd and cast to
 	intmax_t.
 	* libio/tst-ftell-active-handler.c (do_append_test): Likewise.
+	* nptl/tst-mutex5.c: Include <stdint.h>.
+	(do_test): Replace %ld with %jd and cast to intmax_t.
 
 2014-12-19  H.J. Lu  <hongjiu.lu@intel.com>
 
diff --git a/nptl/tst-mutex5.c b/nptl/tst-mutex5.c
index 6988840..48e1ea8 100644
--- a/nptl/tst-mutex5.c
+++ b/nptl/tst-mutex5.c
@@ -22,6 +22,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <sys/time.h>
+#include <stdint.h>
 #include <config.h>
 
 
@@ -132,8 +133,8 @@ do_test (void)
 
       if (tv2.tv_sec < 2)
 	{
-	  printf ("premature timeout: %ld.%06ld difference\n",
-		  tv2.tv_sec, tv2.tv_usec);
+	  printf ("premature timeout: %jd.%06jd difference\n",
+		  (intmax_t) tv2.tv_sec, (intmax_t) tv2.tv_usec);
 	  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]