Re: [PATCH v3] coccinelle: Extend address test from ifaddr to every test expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 13 Jun 2022, Jérémy LEFAURE wrote:

> > A)
> > I would like to point out once more that no questionable places were marked
> > by the software “Coccinelle 1.1.1” (OCaml 4.14.0) in the following source code.
> > https://lore.kernel.org/cocci/da86bc36-36af-7bd7-6bee-861e160ba6a4@xxxxxx/
> > https://sympa.inria.fr/sympa/arc/cocci/2022-06/msg00017.html
> >
> >
> > void check(void)
> > {
> > int s = 1;
> > bool t = (&s);
> > }
> >
> >
> > Thus I propose to add another case distinction by the means of
> > a SmPL disjunction.
> >
> >
> > *\( &x || ... \| &x \)
> >
>
> Unfortunately this creates false positives as it matches address-of
> operator outside of test expressions such as in this code:
>
> void foo(int *a);
>
> void call_foo(int a)
> {
>   foo(&a);
> }
>
>
> > B)
> > I imagine that generated diff output should be wrapped by a source block
> > for the operation mode “org”.
> > https://orgmode.org/quickstart.html#blocks
>
> This patch does not change the "org" mode output, it only changes the
> matching part. Anyway, I am not sure that coccilib supports blocks, I
> did not find any reference to block in the code [1]. Do you have an
> example were it is used?
>
> [1]: https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/master/python/coccilib/org.py

No, I don't think that blocks are supported and the org mode code should
be fine as it is.  In any case, it's not relevant to this patch.

julia

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux