The unused variables warning really finds a lot in Roxen. However, it misses cases with initial assignments, e.g:
void main() { int foo = 453; return 0; }
Would it be possible to extend it to catch these too?
Ideally it should only count non-lvalue references so e.g. even this one would count as an unused variable:
void main() { string foo; write ("hello world\n"); foo = Stdio.stdin->gets(); return 0; }
I would really apreciate it if it did not warn for unused arguments, though.
It's a total pain when working with any API that involves callbacks, such as the Stdio.File async api.
Maybe the parser could be changed to allow nameless arguments?
void my_read_cb (mixed, string data) { ... }
Good point. It would have to be restricted to either noncomplex types or side-effect free initializations, I guess.
pike-devel@lists.lysator.liu.se