coccigrep
coccigrep copied to clipboard
Strange mismatch
I was working with the file "mp4.c" of VLC gitweb link
The following:
coccigrep -t demux_sys_t -a i_timescale -c -o set mp4.c
returns nothing, although line 476, you have this :
p_sys->i_timescale = p_mvhd->data.p_mvhd->i_timescale;
And even without the "-o set", this line isn't detected.
I've got latest coccigrep and coccinelle -1.0.0-rc9
This is strange because there is nothing unusual in the mismatched line...
Actually it seems to be a bug in coccinelle, because using coccinelle directly with:
spatch -sp "e:demux_sys_t *:->i_timescale" mp4.c
I get a lot of matches, but not the one in question.
Indeed a coccinelle bug:
http://comments.gmane.org/gmane.comp.version-control.coccinelle/2214
Julia Lawall is great as usual!
Indeed!
Now what would be great, in coccigrep, would to trigger a warning like:
WARNING: mp4.c lines 64 - 124 could not be parsed. You may run "spatch -type_c mp4.c" to have the details.
I can try to do a patch if you want, but I may need the help of Julia again, because I'm not sure that running:
spatch -type_c
and then parsing the output would be the most effecient way to do that...
Hello,
If the warning occurs, we could at least have the user understand that there could have been some miss in the search. And that's an interesting information. Next step could be to fix it completely and use -type_c output but this is a second step.