From patchwork Fri Dec 19 22:15:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 4378 Received: (qmail 18893 invoked by alias); 19 Dec 2014 22:15:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 18871 invoked by uid 89); 19 Dec 2014 22:15:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga11.intel.com X-ExtLoop1: 1 Date: Fri, 19 Dec 2014 14:15:24 -0800 From: "H.J. Lu" To: GNU C Library Subject: [PATCH 6/9] BZ #17732: Replace %ld with %jd and cast to intmax_t Message-ID: <20141219221523.GF672@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) OK to install? H.J. --- ChangeLog | 2 ++ stdio-common/tst-fmemopen2.c | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98f2677..c85da35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,8 @@ * rt/tst-timer4.c: Include . (check_ts): Replace %ld with %jd and cast to intmax_t. (do_test): Likewise. + * stdio-common/tst-fmemopen2.c (do_test): Replace %ld with %jd + and cast to intmax_t. 2014-12-19 H.J. Lu diff --git a/stdio-common/tst-fmemopen2.c b/stdio-common/tst-fmemopen2.c index c2a4baa..e9d8b63 100644 --- a/stdio-common/tst-fmemopen2.c +++ b/stdio-common/tst-fmemopen2.c @@ -21,14 +21,15 @@ do_test (void) off_t o = ftello (fp); if (o != nstr) { - printf ("first ftello returned %ld, expected %zu\n", o, nstr); + printf ("first ftello returned %jd, expected %zu\n", + (intmax_t) o, nstr); result = 1; } rewind (fp); o = ftello (fp); if (o != 0) { - printf ("second ftello returned %ld, expected 0\n", o); + printf ("second ftello returned %jd, expected 0\n", (intmax_t) o); result = 1; } if (fseeko (fp, 0, SEEK_END) != 0) @@ -39,7 +40,8 @@ do_test (void) o = ftello (fp); if (o != nstr) { - printf ("third ftello returned %ld, expected %zu\n", o, nstr); + printf ("third ftello returned %jd, expected %zu\n", + (intmax_t) o, nstr); result = 1; } rewind (fp); @@ -50,7 +52,8 @@ do_test (void) o = ftello (fp); if (o != nstr2) { - printf ("fourth ftello returned %ld, expected %zu\n", o, nstr2); + printf ("fourth ftello returned %jd, expected %zu\n", + (intmax_t) o, nstr2); result = 1; } fclose (fp);