From patchwork Fri Dec 19 22:17:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 4381 Received: (qmail 23076 invoked by alias); 19 Dec 2014 22:17:40 -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 23064 invoked by uid 89); 19 Dec 2014 22:17:39 -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:37 -0800 From: "H.J. Lu" To: GNU C Library Subject: [PATCH 9/9] BZ #17732: Replace %ld with %jd and cast to intmax_t Message-ID: <20141219221737.GI672@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 | 1 + timezone/tst-timezone.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b32f26f..2c5ec3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,6 +43,7 @@ * sysdeps/pthread/tst-timer.c (main): Likewise. * time/clocktest.c (main): Likewise. * time/tst-posixtz.c (do_test): Likewise. + * timezone/tst-timezone.c (main): Likewise. 2014-12-19 H.J. Lu diff --git a/timezone/tst-timezone.c b/timezone/tst-timezone.c index b5edfff..135a72f 100644 --- a/timezone/tst-timezone.c +++ b/timezone/tst-timezone.c @@ -126,8 +126,8 @@ main (int argc, char ** argv) strcpy (envstring, "TZ=Europe/London"); putenv (envstring); t = mktime (&tmBuf); - snprintf (buf, sizeof (buf), "TZ=%s %ld %d %d %d %d %d %d %d %d %d", - getenv ("TZ"), t, + snprintf (buf, sizeof (buf), "TZ=%s %jd %d %d %d %d %d %d %d %d %d", + getenv ("TZ"), (intmax_t) t, tmBuf.tm_sec, tmBuf.tm_min, tmBuf.tm_hour, tmBuf.tm_mday, tmBuf.tm_mon, tmBuf.tm_year, tmBuf.tm_wday, tmBuf.tm_yday, tmBuf.tm_isdst); @@ -149,8 +149,8 @@ main (int argc, char ** argv) strcpy (envstring, "TZ=GMT"); /* No putenv call needed! */ t = mktime (&tmBuf); - snprintf (buf, sizeof (buf), "TZ=%s %ld %d %d %d %d %d %d %d %d %d", - getenv ("TZ"), t, + snprintf (buf, sizeof (buf), "TZ=%s %jd %d %d %d %d %d %d %d %d %d", + getenv ("TZ"), (intmax_t) t, tmBuf.tm_sec, tmBuf.tm_min, tmBuf.tm_hour, tmBuf.tm_mday, tmBuf.tm_mon, tmBuf.tm_year, tmBuf.tm_wday, tmBuf.tm_yday, tmBuf.tm_isdst);