Re: [Cocci] transform oddity / bug ?

2020-09-04 Thread Julia Lawall
On Thu, 3 Sep 2020, Joe Perches wrote: > On Thu, 2020-09-03 at 17:14 +0200, Julia Lawall wrote: > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote: > > > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > > > On Sun, 2020-08-30 at 20:41 +0200,

Re: [Cocci] transform oddity / bug ?

2020-09-03 Thread Joe Perches
On Thu, 2020-09-03 at 17:14 +0200, Julia Lawall wrote: > On Wed, 2 Sep 2020, Joe Perches wrote: > > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote: > > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote: > > > > > On Sun, 30 Aug 2020, Joe

Re: [Cocci] transform oddity / bug ?

2020-09-03 Thread Julia Lawall
On Thu, 3 Sep 2020, Joe Perches wrote: > On Thu, 2020-09-03 at 17:14 +0200, Julia Lawall wrote: > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote: > > > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > > > On Sun, 2020-08-30 at 20:41 +0200,

Re: [Cocci] transform oddity / bug ?

2020-09-03 Thread Julia Lawall
On Wed, 2 Sep 2020, Joe Perches wrote: > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote: > > > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote: > > > > On Sun, 30 Aug 2020, Joe Perches wrote: > > > > > On Sun, 2020-08-30 at 17:46

Re: [Cocci] transform oddity / bug ?

2020-09-03 Thread Joe Perches
On Wed, 2020-09-02 at 23:38 +0200, Julia Lawall wrote: > On Wed, 2 Sep 2020, Joe Perches wrote: > > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote: > > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote: > > > > > On Sun, 30 Aug 2020, Joe

Re: [Cocci] transform oddity / bug ?

2020-09-02 Thread Joe Perches
On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote: > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote: > > > On Sun, 30 Aug 2020, Joe Perches wrote: > > > > On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote: > > > > > Unfortunately this

Re: [Cocci] transform oddity / bug ?

2020-09-02 Thread Julia Lawall
On Wed, 2 Sep 2020, Joe Perches wrote: > On Wed, 2020-09-02 at 22:46 +0200, Julia Lawall wrote: > > > > On Wed, 2 Sep 2020, Joe Perches wrote: > > > > > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote: > > > > On Sun, 30 Aug 2020, Joe Perches wrote: > > > > > On Sun, 2020-08-30 at 17:46

Re: [Cocci] transform oddity / bug ?

2020-09-02 Thread Joe Perches
On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote: > On Sun, 30 Aug 2020, Joe Perches wrote: > > On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote: > > > Unfortunately this does not work when the declaration > > is comma terminated and not semicolon terminated. [] > I will have to look

Re: [Cocci] transform oddity / bug ?

2020-09-02 Thread Julia Lawall
On Wed, 2 Sep 2020, Joe Perches wrote: > On Sun, 2020-08-30 at 20:41 +0200, Julia Lawall wrote: > > On Sun, 30 Aug 2020, Joe Perches wrote: > > > On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote: > > > > Unfortunately this does not work when the declaration > > > is comma terminated and

Re: [Cocci] transform oddity / bug ?

2020-08-30 Thread Julia Lawall
On Sun, 30 Aug 2020, Joe Perches wrote: > On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote: > > The following: > > > > @not_int_not_len exists@ > > type T != int; > > identifier x != len; > > position p; > > identifier sysfs =~ "^sysfs_emit.*$"; > > assignment operator aop; > > @@ > > > >

Re: [Cocci] transform oddity / bug ?

2020-08-30 Thread Joe Perches
On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote: > The following: > > @not_int_not_len exists@ > type T != int; > identifier x != len; > position p; > identifier sysfs =~ "^sysfs_emit.*$"; > assignment operator aop; > @@ > > T@p x; > ... > x aop sysfs(...) > > @@ > type not_int_not_len.T;

Re: [Cocci] transform oddity / bug ?

2020-08-30 Thread Joe Perches
On Sun, 2020-08-30 at 17:46 +0200, Julia Lawall wrote: > [...] > > > Thanks, I used the slightly different from your suggestion > > where sysfs is an identifier with function args and a > > semicolon after the transform type, (otherwise I get cocci errors). > > like this below: > > > > But it

Re: [Cocci] transform oddity / bug ?

2020-08-30 Thread Julia Lawall
[...] > Thanks, I used the slightly different from your suggestion > where sysfs is an identifier with function args and a > semicolon after the transform type, (otherwise I get cocci errors). > like this below: > > But it doesn't work (no renaming) when there is an > initializer to the variable

Re: [Cocci] transform oddity / bug ?

2020-08-30 Thread Joe Perches
On Sun, 2020-08-30 at 10:27 +0200, Julia Lawall wrote: > > On Sun, 30 Aug 2020, Joe Perches wrote: > > > On Sun, 2020-08-30 at 08:57 +0200, Julia Lawall wrote: > > > On Sat, 29 Aug 2020, Joe Perches wrote: > > > > > > > Is it me not understanding cocci grammar again? > > > > > > The problem is

Re: [Cocci] transform oddity / bug ?

2020-08-30 Thread Julia Lawall
On Sun, 30 Aug 2020, Joe Perches wrote: > On Sun, 2020-08-30 at 08:57 +0200, Julia Lawall wrote: > > > > On Sat, 29 Aug 2020, Joe Perches wrote: > > > > > Is it me not understanding cocci grammar again? > > > > The problem is the loop. You are trying to change something in the body > > of a

Re: [Cocci] transform oddity / bug ?

2020-08-30 Thread Joe Perches
On Sun, 2020-08-30 at 08:57 +0200, Julia Lawall wrote: > > On Sat, 29 Aug 2020, Joe Perches wrote: > > > Is it me not understanding cocci grammar again? > > The problem is the loop. You are trying to change something in the body > of a loop and the body of a for loop might not be executed.

Re: [Cocci] transform oddity / bug ?

2020-08-30 Thread Julia Lawall
On Sat, 29 Aug 2020, Joe Perches wrote: > Is it me not understanding cocci grammar again? The problem is the loop. You are trying to change something in the body of a loop and the body of a for loop might not be executed. ... means that the thing must be found on every execution path. Do