]> Savannah Git Hosting - gnulib.git/commitdiff
ctime: fix false positive
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 3 Feb 2024 20:05:17 +0000 (12:05 -0800)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Feb 2024 23:26:25 +0000 (00:26 +0100)
Problem reported by Bjarni Ingi Gislason in:
https://lists.gnu.org/r/bug-gnulib/2024-02/msg00006.html
* lib/time.in.h (ctime): Do not warn about ctime portability,
as there is a more serious warning about it crashing,
and the two warning directives can cause false alarms.

ChangeLog
lib/time.in.h

index 63cd536b4026237b4183b7c767f88c14801403f1..214be56649e7bd65cf78806d6f1bbabd3515af1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-02-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       ctime: fix false positive
+       Problem reported by Bjarni Ingi Gislason in:
+       https://lists.gnu.org/r/bug-gnulib/2024-02/msg00006.html
+       * lib/time.in.h (ctime): Do not warn about ctime portability,
+       as there is a more serious warning about it crashing,
+       and the two warning directives can cause false alarms.
+
 2024-01-30  Bruno Haible  <bruno@clisp.org>
 
        Update copyright year in tests/unictype/*.
index ce28f1af25d812c246e36687f6f1ca25a4687ce5..df99c8abca9b932e8427e1c37e931e563cb885f0 100644 (file)
@@ -438,11 +438,7 @@ _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp));
 _GL_CXXALIASWARN (ctime);
 #  endif
 # elif defined GNULIB_POSIXCHECK
-#  undef ctime
-#  if HAVE_RAW_DECL_CTIME
-_GL_WARN_ON_USE (ctime, "ctime has portability problems - "
-                 "use gnulib module ctime for portability");
-#  endif
+/* No need to warn about portability, as a more serious warning is below.  */
 # endif
 
 /* Convert *TP to a date and time string.  See