On Saturday, July 15, 2017 10:07:39 PM Julia Lawall wrote:
> Drop static on a local variable, when the variable is initialized before
> any possible use. Thus, the static has no benefit.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> //
> @bad e
Drop static on a local variable, when the variable is initialized before
any possible use. Thus, the static has no benefit.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@bad exists@
position p;
identifier x;
type T;
@@
static T x@p;
...
x = <+...x...
2 matches
Mail list logo