Re: [Cocci] check for non-const arguments used only as const accesses

2018-06-11 Thread Julia Lawall
On Mon, 11 Jun 2018, Joe Perches wrote: > On Mon, 2018-06-11 at 23:23 +0200, Julia Lawall wrote: > > On Mon, 11 Jun 2018, Joe Perches wrote: > > > Many times it would be useful to update functions > > > where non-const arguments are used only as const > > > dereferences or as arguments to

Re: [Cocci] Weird whitespace behavior?

2018-06-11 Thread Julia Lawall
On Mon, 11 Jun 2018, Kees Cook wrote: > On Mon, Jun 11, 2018 at 4:17 PM, Kees Cook wrote: > > Hi, > > > > I've been doing some large treewide changes to the allocators, and I > > notice that Coccinelle does something odd for a specific case. I have > > two scripts, one operating on kmalloc()

Re: [Cocci] Weird whitespace behavior?

2018-06-11 Thread Kees Cook
On Mon, Jun 11, 2018 at 4:17 PM, Kees Cook wrote: > Hi, > > I've been doing some large treewide changes to the allocators, and I > notice that Coccinelle does something odd for a specific case. I have > two scripts, one operating on kmalloc() and one operating on > devm_kmalloc(). They are

Re: [Cocci] check for non-const arguments used only as const accesses

2018-06-11 Thread Joe Perches
On Mon, 2018-06-11 at 23:23 +0200, Julia Lawall wrote: > On Mon, 11 Jun 2018, Joe Perches wrote: > > Many times it would be useful to update functions > > where non-const arguments are used only as const > > dereferences or as arguments to other function that > > use const. > > > > Is it possible

[Cocci] check for non-const arguments used only as const accesses

2018-06-11 Thread Joe Perches
Many times it would be useful to update functions where non-const arguments are used only as const dereferences or as arguments to other function that use const. Is it possible for coccinelle to find and show these types of uses that could be const? e.g. int foo(int val, u8 *a, int index) {

[Cocci] Weird whitespace behavior?

2018-06-11 Thread Kees Cook
Hi, I've been doing some large treewide changes to the allocators, and I notice that Coccinelle does something odd for a specific case. I have two scripts, one operating on kmalloc() and one operating on devm_kmalloc(). They are identical script except for the function names, however, while

Re: [Cocci] check for non-const arguments used only as const accesses

2018-06-11 Thread Julia Lawall
On Mon, 11 Jun 2018, Joe Perches wrote: > Many times it would be useful to update functions > where non-const arguments are used only as const > dereferences or as arguments to other function that > use const. > > Is it possible for coccinelle to find and show > these types of uses that could

Re: [Cocci] Support for C++ delete expressions

2018-06-11 Thread Julia Lawall
delete [] is now supported by the C++ parser (ie with option --c++). Note that no C++ specific operators are supported by the semantic patch language. julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci