From: Bruno Haible Date: Sun, 18 Oct 2020 18:42:56 +0000 (+0200) Subject: time: Fix warning about asctime when asctime is not used. X-Git-Tag: v1.0~3559 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=e9297956ae0e5dc350fea999e42365fa21a48c30;p=gnulib.git time: Fix warning about asctime when asctime is not used. * lib/time.in.h (asctime_r, ctime, ctime_r): Fix _GL_WARN_ON_USE invocation. --- diff --git a/ChangeLog b/ChangeLog index df3eabfefd..f6705c65e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-10-18 Bruno Haible + + time: Fix warning about asctime when asctime is not used. + * lib/time.in.h (asctime_r, ctime, ctime_r): Fix _GL_WARN_ON_USE + invocation. + 2020-10-18 Bruno Haible *-list, *-oset, *-omap: Avoid a GCC warning (regression 2020-10-10). diff --git a/lib/time.in.h b/lib/time.in.h index 3b539c2566..2c7172e8a5 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -356,17 +356,17 @@ _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " # endif # if defined GNULIB_POSIXCHECK # undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " +_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " +_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " +_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif