This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [v1] Add Reiwa era tests to time/tst-strftime3.c
- From: Steve Ellcey <sellcey at marvell dot com>
- To: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "dj at redhat dot com" <dj at redhat dot com>
- Cc: "tamuki at linet dot gr dot jp" <tamuki at linet dot gr dot jp>, "digitalfreak at lingonborough dot com" <digitalfreak at lingonborough dot com>
- Date: Tue, 2 Apr 2019 22:36:52 +0000
- Subject: Re: [v1] Add Reiwa era tests to time/tst-strftime3.c
- References: <xn8swto78p.fsf@greed.delorie.com>
On Mon, 2019-04-01 at 15:28 -0400, DJ Delorie wrote:
> Conditional, of course, on bz24405 making the era change,
> and someone verifying the results are correct ;-)
>
> 2019-04-01 DJ Delorie <dj@delorie.com>
>
> * time/tst-strftime3.c: Add Reiwa era tests.
DJ,
I am building ToT glibc with ToT gcc and during glibc testing I got
this error:
tst-strftime3.c: In function ‘tm_to_printed’:
tst-strftime3.c:443:62: error: ‘%s’ directive output may be truncated writing up to 49 bytes into a region of size between 0 and 30 [-Werror=format-truncation=]
443 | snprintf (buffer, TMBUFLEN, "%04d/%02d/%02d %02d:%02d:%02d %s",
| ^~
tst-strftime3.c:443:3: note: ‘snprintf’ output between 21 and 122 bytes into a destination of size 50
443 | snprintf (buffer, TMBUFLEN, "%04d/%02d/%02d %02d:%02d:%02d %s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444 | tm->tm_year + 1900,
| ~~~~~~~~~~~~~~~~~~~
445 | tm->tm_mon + 1,
| ~~~~~~~~~~~~~~~
446 | tm->tm_mday,
| ~~~~~~~~~~~~
447 | tm->tm_hour,
| ~~~~~~~~~~~~
448 | tm->tm_min,
| ~~~~~~~~~~~
449 | tm->tm_sec,
| ~~~~~~~~~~~
450 | wn);
| ~~~