This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 4/9] BZ #17732: Replace %ld with %jd and cast to intmax_t
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 19 Dec 2014 14:13:57 -0800
- Subject: [PATCH 4/9] BZ #17732: Replace %ld with %jd and cast to intmax_t
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
OK to install?
H.J.
---
ChangeLog | 2 ++
posix/tst-regex.c | 16 ++++++++--------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index cb00ebe..2aa3275 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,8 @@
* 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.
+ * posix/tst-regex.c (run_test): Likewise.
+ (run_test_backwards): Likewise.
2014-12-19 H.J. Lu <hongjiu.lu@intel.com>
diff --git a/posix/tst-regex.c b/posix/tst-regex.c
index 7df0bd1..0e086ab 100644
--- a/posix/tst-regex.c
+++ b/posix/tst-regex.c
@@ -274,8 +274,8 @@ run_test (const char *expr, const char *mem, size_t memlen, int icase,
finish.tv_sec -= start.tv_sec;
}
- printf ("elapsed time: %ld.%09ld sec\n",
- finish.tv_sec, finish.tv_nsec);
+ printf ("elapsed time: %jd.%09jd sec\n",
+ (intmax_t) finish.tv_sec, (intmax_t) finish.tv_nsec);
}
}
@@ -327,8 +327,8 @@ run_test (const char *expr, const char *mem, size_t memlen, int icase,
mintime = finish;
}
}
- printf ("elapsed time: %ld.%09ld sec\n",
- mintime.tv_sec, mintime.tv_nsec);
+ printf ("elapsed time: %jd.%09jd sec\n",
+ (intmax_t) mintime.tv_sec, (intmax_t) mintime.tv_nsec);
}
#endif
@@ -420,8 +420,8 @@ run_test_backwards (const char *expr, const char *mem, size_t memlen,
finish.tv_sec -= start.tv_sec;
}
- printf ("elapsed time: %ld.%09ld sec\n",
- finish.tv_sec, finish.tv_nsec);
+ printf ("elapsed time: %jd.%09jd sec\n",
+ (intmax_t) finish.tv_sec, (intmax_t) finish.tv_nsec);
}
}
@@ -489,8 +489,8 @@ run_test_backwards (const char *expr, const char *mem, size_t memlen,
mintime = finish;
}
}
- printf ("elapsed time: %ld.%09ld sec\n",
- mintime.tv_sec, mintime.tv_nsec);
+ printf ("elapsed time: %jd.%09jd sec\n",
+ (intmax_t) mintime.tv_sec, (intmax_t) mintime.tv_nsec);
}
#endif
--
1.9.3