From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76029 invoked by alias); 8 Aug 2018 08:52:26 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 75971 invoked by uid 9078); 8 Aug 2018 08:52:26 -0000 Date: Wed, 08 Aug 2018 08:52:00 -0000 Message-ID: <20180808085226.75968.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] newlib: strftime: fix gcc warning on __ctloc X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: dedeea99658ed476a1fdb06ed46576808c59d3b6 X-Git-Newrev: 0283642f35ce019589a6263b7eb0646776fca157 X-SW-Source: 2018-q3/txt/msg00036.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0283642f35ce019589a6263b7eb0646776fca157 commit 0283642f35ce019589a6263b7eb0646776fca157 Author: Corinna Vinschen Date: Tue Aug 7 15:20:29 2018 +0200 newlib: strftime: fix gcc warning on __ctloc Signed-off-by: Corinna Vinschen Diff: --- newlib/libc/time/strftime.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c index 3e5e268..0cb3123 100644 --- a/newlib/libc/time/strftime.c +++ b/newlib/libc/time/strftime.c @@ -294,7 +294,7 @@ locale, hard-coding the "C" locale settings. # define CHAR char /* string type basis */ # define CQ(a) a /* character constant qualifier */ # define SFLG /* %s flag (null for normal char) */ -# define _ctloc(x) (ctloclen = strlen (ctloc = _CurrentTimeLocale->x), ctloc) +# define _ctloc(x) (ctloclen = strlen (ctloc = _CurrentTimeLocale->x)) # define snprintf sniprintf /* avoid to pull in FP functions. */ # define TOLOWER(c) tolower((int)(unsigned char)(c)) # define STRTOUL(c,p,b) strtoul((c),(p),(b)) @@ -315,8 +315,7 @@ locale, hard-coding the "C" locale settings. # define STRLEN(a) wcslen(a) # define SFLG "l" /* %s flag (l for wide char) */ # ifdef __HAVE_LOCALE_INFO_EXTENDED__ -# define _ctloc(x) (ctloclen = wcslen (ctloc = _CurrentTimeLocale->w##x), \ - ctloc) +# define _ctloc(x) (ctloclen = wcslen (ctloc = _CurrentTimeLocale->w##x)) # else # define CTLOCBUFLEN 256 /* Arbitrary big buffer size */ const wchar_t * @@ -328,8 +327,7 @@ locale, hard-coding the "C" locale settings. *len_ret = 0; return buf; } -# define _ctloc(x) (ctloc = __ctloc (ctlocbuf, _CurrentTimeLocale->x, \ - &ctloclen)) +# define _ctloc(x) (ctloc = __ctloc (ctlocbuf, _CurrentTimeLocale->x)) # endif #endif /* MAKE_WCSFTIME */