disabling compiler warnings
Wed Apr 19 14:34:22 CEST 2000
Based on my experiences from teaching Erlang courses,
the warnings really are useful. A more experienced
programmer can turn off the warnings like Mattias indicated.
In my mind, an even better solution to the problem is to
rewrite the if. Instead of:
Arne = true;
Arne = false
Arne = if
> Hal Snyder writes
> Hal> 4. The second program has perfectly legal balanced exports of
> Hal> variables from both branches of an if structure. This leads
> Hal> to a slew of inappropriate warnings - and I don't see any way
> Hal> to turn them off without rebuilding the compiler. There is a
> Hal> compiler switch to enable warning reports, on by default, but
> Hal> no apparent way to turn it off.
> I agree that the warnings in the fibsrch program (the first one)
> are rather over-zealous of the compiler, but there are slightly more
> verbose ways to code around the warnings, which save your bacon in
> other cases.
> In any case, disabling the warnings doesn't require a rebuild. Just
> create a user_default.beam from source something like:
> c(File) -> compile:file(File, ).
> You can arrange for this to be loaded automatically via the .erlang file:
> Read more about the .erlang and user_default file at
More information about the erlang-questions