[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lint warnings from `bison -y' generated files
From: |
Nicolas Joly |
Subject: |
Re: lint warnings from `bison -y' generated files |
Date: |
Wed, 5 Oct 2005 11:01:53 +0200 |
User-agent: |
Mutt/1.5.8i |
On Tue, Oct 04, 2005 at 11:21:05PM -0700, Paul Eggert wrote:
>
> I installed this patch to fix the problems with casts to void:
>
> 2005-10-04 Paul Eggert <address@hidden>
>
> * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
> Use assignments rather than casts-to-void to suppress
> unused-variable warnings. This pacifies 'lint'.
> * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
> unused-variable warnings.
Thanks Paul,
It seems that you missed some. At least the one i'm facing in
yydestruct() definition (data/c.m4:389) :
m4_define_default([b4_yydestruct_generate],
[[/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
]$1([yydestruct],
[static void],
[[const char *yymsg], [yymsg]],
[[int yytype], [yytype]],
[[YYSTYPE *yyvaluep], [yyvaluep]]b4_location_if([,
[[YYLTYPE *yylocationp], [yylocationp]]]))[
{
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
]b4_location_if([ (void) yylocationp;
])[
if (!yymsg)
yymsg = "Deleting";
[...]
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.