[Cocci] Why some changes are not done ?

2017-11-24 Thread Francois-Xavier Le Bail
Hi, I use the following Coccinelle script to rename some macros: @@ expression E; @@ ( -EXTRACT_16BITS(E) +EXTRACT_BE_16BITS(E) | -EXTRACT_32BITS(E) +EXTRACT_BE_32BITS(E) ) on the this source: https://raw.githubusercontent.com/the-tcpdump-group/tcpdump/6151e2190b0b40bdb6cf56354eb016284762d27b/pri

Re: [Cocci] Why some changes are not done ?

2017-11-24 Thread Francois-Xavier Le Bail
On 24/11/2017 11:23, Julia Lawall wrote: > On Fri, 24 Nov 2017, Francois-Xavier Le Bail wrote: >> I use the following Coccinelle script to rename some macros: >> @@ >> expression E; >> @@ >> ( >> -EXTRACT_16BITS(E) >> +EXTRACT_BE_16BITS(E) >&

Re: [Cocci] Why some changes are not done ?

2017-11-24 Thread Francois-Xavier Le Bail
On 24/11/2017 12:00, Julia Lawall wrote: > > > On Fri, 24 Nov 2017, Francois-Xavier Le Bail wrote: > >> On 24/11/2017 11:23, Julia Lawall wrote: >>> On Fri, 24 Nov 2017, Francois-Xavier Le Bail wrote: >>>> I use the following Coccinelle script to rename

Re: [Cocci] Why some changes are not done ?

2017-11-24 Thread Francois-Xavier Le Bail
On 24/11/2017 12:35, Julia Lawall wrote: > > > On Fri, 24 Nov 2017, Francois-Xavier Le Bail wrote: > >> On 24/11/2017 12:00, Julia Lawall wrote: >>> >>> >>> On Fri, 24 Nov 2017, Francois-Xavier Le Bail wrote: >>> >>>> On 24/11/2

[Cocci] Question about a not made change

2017-11-24 Thread Francois-Xavier Le Bail
Hi, I try the following patch: - @@ u_char *p; expression n; @@ ND_PRINT( ..., -p[n] +EXTRACT_U_1(p + n) ) - on the following (minimized) code: - int main() { u_char *p; ND_PRINT(ndo, ": %02x %02x", p[1], p[2]); return 0; } - I got: - +++ /tmp/cocci-ou

Re: [Cocci] Why some changes are not done ?

2017-11-24 Thread Francois-Xavier Le Bail
On 24/11/2017 19:29, Julia Lawall wrote: > > > On Fri, 24 Nov 2017, Francois-Xavier Le Bail wrote: > >> On 24/11/2017 12:35, Julia Lawall wrote: >>> >>> >>> On Fri, 24 Nov 2017, Francois-Xavier Le Bail wrote: >>> >>>> On 24/1

Re: [Cocci] Question about a not made change

2017-11-24 Thread Francois-Xavier Le Bail
On 25/11/2017 08:44, Julia Lawall wrote: > > > On Sat, 25 Nov 2017, Francois-Xavier Le Bail wrote: > >> Hi, >> >> I try the following patch: >> - >> @@ >> u_char *p; >> expression n; >> @@ >> ND_PRINT( >> ..., >&

Re: [Cocci] Question about a not made change

2017-11-25 Thread Francois-Xavier Le Bail
On 25/11/2017 08:44, Julia Lawall wrote: > On Sat, 25 Nov 2017, Francois-Xavier Le Bail wrote: >> I try the following patch: >> - >> @@ >> u_char *p; >> expression n; >> @@ >> ND_PRINT( >> ..., >> -p[n] >> +EXTRACT_U_1(p + n) >&

Re: [Cocci] Question about a not made change

2017-11-27 Thread Francois-Xavier Le Bail
On 25/11/2017 14:32, Julia Lawall wrote: > > > On Sat, 25 Nov 2017, Francois-Xavier Le Bail wrote: > >> On 25/11/2017 08:44, Julia Lawall wrote: >>> On Sat, 25 Nov 2017, Francois-Xavier Le Bail wrote: >>>> I try the following patch: >>>&

[Cocci] Sources with high badcount

2018-01-04 Thread Francois-Xavier Le Bail
Hi, I got high badcounts with some sources. One of them is: https://raw.githubusercontent.com/the-tcpdump-group/tcpdump/master/print-bootp.c Options are: --debug --verbose-parsing --no-includes Partial log is: === init_defs_buil

Re: [Cocci] Sources with high badcount

2018-01-04 Thread Francois-Xavier Le Bail
On 04/01/2018 15:09, Julia Lawall wrote: > > > On Thu, 4 Jan 2018, Francois-Xavier Le Bail wrote: > >> Hi, >> >> I got high badcounts with some sources. > > Actually, in this case there are just some parse errrors in the code. > > ND_PRINT((ndo,

Re: [Cocci] Sources with high badcount

2018-01-04 Thread Francois-Xavier Le Bail
On 04/01/2018 15:53, Julia Lawall wrote: > > > On Thu, 4 Jan 2018, Francois-Xavier Le Bail wrote: > >> On 04/01/2018 15:09, Julia Lawall wrote: >>> >>> >>> On Thu, 4 Jan 2018, Francois-Xavier Le Bail wrote: >>> >>>> Hi, >>&

[Cocci] Not pointer expression

2018-02-08 Thread Francois-Xavier Le Bail
Hi, expression *e; define 'e' is a pointer expression. Is there a way to define 'e' is *not* a pointer expression? -- Francois-Xavier ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] Not pointer expression

2018-02-08 Thread Francois-Xavier Le Bail
On 08/02/2018 15:44, Julia Lawall wrote: > > > On Thu, 8 Feb 2018, Francois-Xavier Le Bail wrote: > >> Hi, >> >> expression *e; >> define 'e' is a pointer expression. >> >> Is there a way to define 'e' is *not* a pointer e