On Tue, Nov 02, 2010 at 20:42 +0100, Julia Lawall wrote:
> On Tue, 2 Nov 2010, Vasiliy Kulikov wrote:
> > Is there any way to differ constant string and just variables?
> >
> > E.g.
> >
> > printf("%s", s);
> >
> > vs
> >
> > char fmt[] = "%s";
> > printf(ftm, s);
> >
> > ?
>
> Do you want a metavariable of type constant char [] ?
Thank you! This seems to work:
@@
constant char [] x;
expression y;
@@
printf( \( x \|
*y
\) , ...);
--
Vasiliy
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)