From patchwork Fri Dec 19 22:17:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 4380 Received: (qmail 21192 invoked by alias); 19 Dec 2014 22:17:12 -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 21179 invoked by uid 89); 19 Dec 2014 22:17:11 -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: mga01.intel.com X-ExtLoop1: 1 Date: Fri, 19 Dec 2014 14:17:09 -0800 From: "H.J. Lu" To: GNU C Library Subject: [PATCH 8/9] BZ #17732: Replace %ld with %jd and cast to intmax_t Message-ID: <20141219221709.GH672@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 ++ time/clocktest.c | 4 ++-- time/tst-posixtz.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6348e4..b32f26f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,8 @@ * stdio-common/tst-fmemopen2.c (do_test): Replace %ld with %jd and cast to intmax_t. * sysdeps/pthread/tst-timer.c (main): Likewise. + * time/clocktest.c (main): Likewise. + * time/tst-posixtz.c (do_test): Likewise. 2014-12-19 H.J. Lu diff --git a/time/clocktest.c b/time/clocktest.c index f2b3ea7..2e6457d 100644 --- a/time/clocktest.c +++ b/time/clocktest.c @@ -28,8 +28,8 @@ main (int argc, char ** argv) while (!gotit); stop = clock (); - printf ("%ld clock ticks per second (start=%ld,stop=%ld)\n", - stop - start, start, stop); + printf ("%jd clock ticks per second (start=%jd,stop=%jd)\n", + (intmax_t) (stop - start), (intmax_t) start, (intmax_t) stop); printf ("CLOCKS_PER_SEC=%ld, sysconf(_SC_CLK_TCK)=%ld\n", CLOCKS_PER_SEC, sysconf(_SC_CLK_TCK)); return 0; diff --git a/time/tst-posixtz.c b/time/tst-posixtz.c index c1ea267..16aa19d 100644 --- a/time/tst-posixtz.c +++ b/time/tst-posixtz.c @@ -39,7 +39,8 @@ do_test (void) char buf[100]; struct tm *tmp; - printf ("TZ = \"%s\", time = %ld => ", tests[cnt].tz, tests[cnt].when); + printf ("TZ = \"%s\", time = %jd => ", tests[cnt].tz, + (intmax_t) tests[cnt].when); fflush (stdout); setenv ("TZ", tests[cnt].tz, 1);