* lib/getdate.y (yyerror): Make the arguments pointer-to-const,
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Oct 2006 19:54:55 +0000 (19:54 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Oct 2006 19:54:55 +0000 (19:54 +0000)
to pacify GCC with some -W flags enabled.  Problem reported by
Bruno Haible.

ChangeLog
lib/getdate.y

index c4f0ea5..a2de46d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
+       to pacify GCC with some -W flags enabled.  Problem reported by
+       Bruno Haible.
+
 2006-10-24  Jim Meyering  <jim@meyering.net>
 
        * MODULES.html.sh: Remove uinttostr.  It's not a module.
index 29a4be1..1507310 100644 (file)
@@ -195,7 +195,7 @@ typedef struct
 
 union YYSTYPE;
 static int yylex (union YYSTYPE *, parser_control *);
-static int yyerror (parser_control *, char *);
+static int yyerror (parser_control const *, char const *);
 static long int time_zone_hhmm (textint, long int);
 
 %}
@@ -1106,7 +1106,8 @@ yylex (YYSTYPE *lvalp, parser_control *pc)
 
 /* Do nothing if the parser reports an error.  */
 static int
-yyerror (parser_control *pc ATTRIBUTE_UNUSED, char *s ATTRIBUTE_UNUSED)
+yyerror (parser_control const *pc ATTRIBUTE_UNUSED,
+        char const *s ATTRIBUTE_UNUSED)
 {
   return 0;
 }