]> 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:10:38 +0000 (00:10 +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 6a646b90635654ce977cf11a3256f994940907cd..76f9a47244e5f5dc587cee238c133aedb7920d29 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