Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange mismatch #8

Open
yhuelf opened this issue Jan 19, 2012 · 5 comments
Open

Strange mismatch #8

yhuelf opened this issue Jan 19, 2012 · 5 comments

Comments

@yhuelf
Copy link
Contributor

yhuelf commented Jan 19, 2012

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...

@yhuelf
Copy link
Contributor Author

yhuelf commented Jan 23, 2012

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.

@yhuelf yhuelf closed this as completed Jan 23, 2012
@yhuelf yhuelf reopened this Jan 23, 2012
@yhuelf
Copy link
Contributor Author

yhuelf commented Jan 27, 2012

@yhuelf yhuelf closed this as completed Jan 27, 2012
@regit
Copy link
Owner

regit commented Jan 27, 2012

Julia Lawall is great as usual!

@yhuelf
Copy link
Contributor Author

yhuelf commented Jan 28, 2012

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...

@regit regit reopened this Mar 5, 2012
@regit
Copy link
Owner

regit commented Mar 5, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants