Re: [Cocci] Removing the last return statement from a void function

2021-03-19 Thread Julia Lawall
On Fri, 19 Mar 2021, Thomas Adam wrote: > On Thu, 18 Mar 2021 at 19:24, Julia Lawall wrote: > > > The ... in Coccinelle is based on control flow, so it is a bit hard to > > find the return at the bottom of the function. Actually, from > > Coccinelle's point of view, all returns are at the bot

Re: [Cocci] Removing the last return statement from a void function

2021-03-19 Thread Thomas Adam
On Thu, 18 Mar 2021 at 19:24, Julia Lawall wrote: > The ... in Coccinelle is based on control flow, so it is a bit hard to > find the return at the bottom of the function. Actually, from > Coccinelle's point of view, all returns are at the bottom of the function, > because one leaves the functio

Re: [Cocci] Removing the last return statement from a void function

2021-03-18 Thread Julia Lawall
On Thu, 18 Mar 2021, Thomas Adam wrote: > Hello all, > > I've another Coccinelle question I'm hoping you can help me with. The > codebase I'm working on is old, and has some interesting styles which > by themselves probably don't cause any problems, but newer C compilers > are now starting to

[Cocci] Removing the last return statement from a void function

2021-03-18 Thread Thomas Adam
Hello all, I've another Coccinelle question I'm hoping you can help me with. The codebase I'm working on is old, and has some interesting styles which by themselves probably don't cause any problems, but newer C compilers are now starting to flag them. In particular, there seems to be a pattern