This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 2/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:01 -0800
- Subject: [PATCH 2/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 | 1 +
libio/tst-ftell-active-handler.c | 12 ++++++------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8c3fb68..9cec358 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
[BZ #17732]
* io/test-utime.c (main): Replace %ld with %jd and cast to
intmax_t.
+ * libio/tst-ftell-active-handler.c (do_append_test): Likewise.
2014-12-19 H.J. Lu <hongjiu.lu@intel.com>
diff --git a/libio/tst-ftell-active-handler.c b/libio/tst-ftell-active-handler.c
index 7be75bc..186aec6 100644
--- a/libio/tst-ftell-active-handler.c
+++ b/libio/tst-ftell-active-handler.c
@@ -574,23 +574,23 @@ do_append_test (const char *filename)
if (seek_ret != new_seek_ret)
{
- printf ("incorrectly modified file offset to %ld, should be %ld",
- new_seek_ret, seek_ret);
+ printf ("incorrectly modified file offset to %jd, should be %jd",
+ (intmax_t) new_seek_ret, (intmax_t) seek_ret);
ret |= 1;
}
else
- printf ("retained current file offset %ld", seek_ret);
+ printf ("retained current file offset %jd", (intmax_t) seek_ret);
new_seek_ret = ftello (fp);
if (seek_ret != new_seek_ret)
{
- printf (", ftello reported incorrect offset %ld, should be %ld\n",
- new_seek_ret, seek_ret);
+ printf (", ftello reported incorrect offset %jd, should be %jd\n",
+ (intmax_t) new_seek_ret, (intmax_t) seek_ret);
ret |= 1;
}
else
- printf (", ftello reported correct offset %ld\n", seek_ret);
+ printf (", ftello reported correct offset %jd\n", (intmax_t) seek_ret);
fclose (fp);
--
1.9.3