From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12682 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] Fix usage of __strftime_fmt_1 in wcsftime Date: Sat, 7 Apr 2018 10:29:45 -0400 Message-ID: <20180407142945.GC3094@brightrain.aerifal.cx> References: <20180407142632.17260-1-samuel@sholland.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1523111280 4709 195.159.176.226 (7 Apr 2018 14:28:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Apr 2018 14:28:00 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12696-gllmg-musl=m.gmane.org@lists.openwall.com Sat Apr 07 16:27:54 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1f4ooq-000162-J2 for gllmg-musl@m.gmane.org; Sat, 07 Apr 2018 16:27:52 +0200 Original-Received: (qmail 22080 invoked by uid 550); 7 Apr 2018 14:30:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22021 invoked from network); 7 Apr 2018 14:29:59 -0000 Content-Disposition: inline In-Reply-To: <20180407142632.17260-1-samuel@sholland.org> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12682 Archived-At: On Sat, Apr 07, 2018 at 09:26:32AM -0500, Samuel Holland wrote: > Commit 8a6bd7307da3fc4d08dd6a9277b611ccb4971354 modified the signature > of __strftime_fmt_1 in strftime.c, but failed to update the prototype in > wcsftime.c. This was found by compiling musl with LTO: > > src/time/wcsftime.c:7:13: warning: type of '__strftime_fmt_1' does \ > not match original declaration [-Wlto-type-mismatch] > --- > src/time/wcsftime.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/time/wcsftime.c b/src/time/wcsftime.c > index 638e64f6..6584c45c 100644 > --- a/src/time/wcsftime.c > +++ b/src/time/wcsftime.c > @@ -4,7 +4,7 @@ > #include "locale_impl.h" > #include "libc.h" > > -const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc); > +const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, int pad); > > size_t __wcsftime_l(wchar_t *restrict s, size_t n, const wchar_t *restrict f, const struct tm *restrict tm, locale_t loc) > { > @@ -35,7 +35,7 @@ size_t __wcsftime_l(wchar_t *restrict s, size_t n, const wchar_t *restrict f, co > } > f = p; > if (*f == 'E' || *f == 'O') f++; > - t_mb = __strftime_fmt_1(&buf, &k, *f, tm, loc); > + t_mb = __strftime_fmt_1(&buf, &k, *f, tm, loc, 0); > if (!t_mb) break; > k = mbstowcs(wbuf, t_mb, sizeof wbuf / sizeof *wbuf); > if (k == (size_t)-1) return 0; > -- > 2.16.1 I think this is necessary but incomplete. It's likely the affected functionality is not working in wcsftime... :( Rich