Re: [PATCH] coccinelle: api/stream_open: Introduce metavariables for checks

From: Nishanth Menon
Date: Tue Apr 05 2022 - 18:40:44 EST


On 08:17-20220405, Julia Lawall wrote:
>
>
> On Mon, 4 Apr 2022, Nishanth Menon wrote:
>
> > Coccinelle spatch version 1.1.1 reports the following:
> > warning: line 134: should no_llseek be a metavariable?
> > warning: line 141: should noop_llseek be a metavariable?
> > warning: line 223: should nonseekable_open be a metavariable?
> > warning: line 290: should nonseekable_open be a metavariable?
> > warning: line 338: should nonseekable_open be a metavariable?
> >
> > So, introduce the metavariable similar to other check instances.
>
> This changes the semantic from matching the specific thing to anything.
> So are you sure that it is what is wanted? If it should always be the
> specific thing, then you can get rid of the warning using eg symbol
> no_llseek.

Aaah thank you. Will post a v2 with s/identifier/symbol. I still need to
grok the nuance between the two in [1]. Thanks for clarifying.

[...]

[1] https://coccinelle.gitlabpages.inria.fr/website/docs/main_grammar.html
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D