[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding a few 'const's

From: Paul Eggert
Subject: Re: adding a few 'const's
Date: Tue, 24 Oct 2006 12:57:13 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Thanks for catching those.  I prefer the 'const' after the type that
it modifies, so I installed the following into gnulib.  (For coreutils
I guess I need to come up to speed on its new version control system.)

2006-10-24  Paul Eggert  <address@hidden>

        * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
        to pacify GCC with some -W flags enabled.  Problem reported by
        Bruno Haible.

--- lib/getdate.y       13 Sep 2006 22:38:14 -0000      1.106
+++ lib/getdate.y       24 Oct 2006 19:54:26 -0000
@@ -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 *p
 /* 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;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]