On Fri, 17 Dec 2010, Eric Leblond wrote:
> Hi,
>
> Le vendredi 03 décembre 2010 à 15:48 +0100, Julia Lawall a écrit :
> > On Fri, 3 Dec 2010, Derek M Jones wrote:
> >
> > > Julia,
> > >
> > > > Version 0.2.5-rc1 has been released. This addresses the problem of
> > >
> > > I don't know what other people on this list think, but in my opinion
> > > Coccinelle should have a higher version number than 0.2.5
> > >
> > > It is a solid piece of software that works well on real world code,
> > > a view that that people looking at it for the first time are
> > > unlikely to have because of the low version number.
> > >
> > > You ought to think about making a version 1.0 release soon.
> >
> > OK, thanks. I guess I will at least finish with 0.2.5, since I have made
> > one rc for that. And another one is likely to follow, because there was
> > another request.
>
> I've finally found the time to try this new release on the "Packet p1,
> p2" problem I've described before. It seems it does not fix the issue.
Put a ... after your int variable declaration:
int
- p
+ *p = SCMalloc(SIZE_OF_PACKET)
;
...
++ if (p == NULL) return 0;
S
Without that Coccinelle seems to be thinking that you want to attach the
if (p == NULL) ... to the ; rather than to S. If it sees something
attached to the semicolon or to the type, then it does not use the
improvement that avoids the "More that one variable in decl" error.
I will add a note about this to the wiki.
julia
> When running the dual.cocci file on det.c, I've got the following
> result:
>
> e...@ice-age:/tmp$ /usr/local/bin/spatch -version
> spatch version 0.2.5-rc1 with Python support
> e...@ice-age:/tmp$ /usr/local/bin/spatch -sp_file dual.cocci -out_place det.c
> init_defs_builtins: /usr/local/share/coccinelle/standard.h
> HANDLING: det.c
> Fatal error: exception Failure("More that one variable in decl. Have to split
> to transform.")
>
> Did I miss something ?
>
> BR,
> --
> Eric Leblond <[email protected]>
> NuFW, Now User Filtering Works : http://www.nufw.org
> _______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)