Ulf Wiger <>
Fri Jan 31 17:11:27 CET 2003

Can someone explain this?

1> c(leader).
2> leader:module_info(compile).
3> c(leader,[warn_unused_vars]).
./leader.erl:126: Warning: variable 'From' is unused
4> leader:module_info(compile).

That is, I've added '-compile(warn_unused_vars)' in the
source code, but the linter seems to ignore that. With
module_info, I can see that the compile option is there. I
don't get any warning unless I add 'warn_unused_vars' as an
explicit option to compile, though.

I looked briefly at compile.erl, but I'd rather that someone
who knows the code take a look. It's not the simplest module
in the OTP distribution.

This is compiler-4.1.1 (OTP R9B)

Ulf Wiger, Senior Specialist,
   / / /   Architecture & Design of Carrier-Class Software
  / / /    Strategic Product & System Management
 / / /     Ericsson Telecom AB, ATM Multiservice Networks

More information about the erlang-questions mailing list