This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Warning in date_and_time.c
- From: Jerry DeLisle <jvdelisle at charter dot net>
- To: gfortran <fortran at gcc dot gnu dot org>
- Date: Thu, 22 Sep 2016 08:59:15 -0700
- Subject: Warning in date_and_time.c
- Authentication-results: sourceware.org; auth=none
I just noticed this today:
../../../trunk/libgfortran/intrinsics/date_and_time.c:173:33: warning: ‘%+03d’
directive output may be truncated writing between 3 and 9 bytes into a region of
size 6 [-Wformat-length=]
snprintf (zone, ZONE_LEN + 1, "%+03d%02d",
^~~~~
../../../trunk/libgfortran/intrinsics/date_and_time.c:173:32: note: directive
argument in the range [-35791394, 35791394]
snprintf (zone, ZONE_LEN + 1, "%+03d%02d",
^~~~~~~~~~~
../../../trunk/libgfortran/intrinsics/date_and_time.c:173:2: note: format output
between 6 and 12 bytes into a destination of size 6
snprintf (zone, ZONE_LEN + 1, "%+03d%02d",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
values[3] / 60, abs (values[3] % 60));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Does anyone know off hand what to do to fix this?
Jerry