[riot-devel] coccinelle

Kaspar Schleiser kaspar at schleiser.de
Fri May 5 12:34:45 CEST 2017

Hi Julia,

On 05/05/2017 08:41 AM, Julia Lawall wrote:
> The following rule finds local variables that are static, but where the
> static property is not used, because the variable is initialized before
> any use.

Thanks! I've added the patch to my coccinelle branch [1].

>  There are only two instances of this problem in RIOT at the
> moment, in code that doesn't look very important, but perhaps the rule
> could be useful in the future, just in case.

Actually half of the static uses actually don't make sense, e.g., using
a static variable within main().

[1] https://github.com/kaspar030/RIOT/tree/add_coccinelle_testing

More information about the devel mailing list