Solidity: Option to disable Unused local variable warning

Created on 30 Jun 2017  路  3Comments  路  Source: ethereum/solidity

There should be option to disable "unused local variable" warnings, since it's very annoying during development and makes errors harder to see. Many 3rd party contracts/libraries produce this warning, which makes it even worse.

Thank you

Most helpful comment

You can "disable" the warning by e.g. commenting out the name of the variable:

function f(uint /* x */) { }.

All 3 comments

You can "disable" the warning by e.g. commenting out the name of the variable:

function f(uint /* x */) { }.

Yeah, but wouldn't it be just simpler if we could do something like --disable-unused-var-warning

Disabling all unused variable warnings is too strong and there is a good way to disable the warning locally. Closing this.

Was this page helpful?
0 / 5 - 0 ratings