This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v1] Add Reiwa era tests to time/tst-strftime3.c


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);
      |      ~~~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]