parse-datetime: Simplify.
authorBruno Haible <bruno@clisp.org>
Sat, 9 Mar 2024 11:45:06 +0000 (12:45 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 9 Mar 2024 11:45:06 +0000 (12:45 +0100)
* lib/parse-datetime.y (yyerror): Change return type to 'void'.

ChangeLog
lib/parse-datetime.y

index 10de1262c3b6a60a3f7f537f2ef17a1b6c48291f..6fed81caa672885be8582958b3155b7274a74e98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-03-09  Bruno Haible  <bruno@clisp.org>
+
+       parse-datetime: Simplify.
+       * lib/parse-datetime.y (yyerror): Change return type to 'void'.
+
 2024-03-09  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Follow gnulib-tool changes, part 48.
index b833055a8ca6ceb703d1b36cb74954a680d309bd..447a943db10d810a847e7dc504f10eff8eea85ff 100644 (file)
@@ -244,7 +244,7 @@ debugging (parser_control const *pc)
 
 union YYSTYPE;
 static int yylex (union YYSTYPE *, parser_control *);
-static int yyerror (parser_control const *, char const *);
+static void yyerror (parser_control const *, char const *);
 static bool time_zone_hhmm (parser_control *, textint, intmax_t);
 
 /* Extract into *PC any date and time info from a string of digits
@@ -1539,11 +1539,10 @@ yylex (union YYSTYPE *lvalp, parser_control *pc)
 }
 
 /* Do nothing if the parser reports an error.  */
-static int
+static void
 yyerror (_GL_UNUSED parser_control const *pc,
          _GL_UNUSED char const *s)
 {
-  return 0;
 }
 
 /* If *TM0 is the old and *TM1 is the new value of a struct tm after