<div dir="ltr"><div>That is right. Here is a minimal code that emits a warning in R15B03 but not in later versions:<br></div><br>-module(warning_test).<br>-export([start/0]).<br><br>start() -><br>    try case recv() of<br>
            {hello, W} -> io:format("hello");<br>            _ -> ok<br>        end<br>        catch K:V -><br>            io:format("issue: ~p ~p", [K, V])<br>    end.<br><br>recv() -><br>
    {hello, world}.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 21, 2014 at 10:35 AM, Kostis Sagonas <span dir="ltr"><<a href="mailto:kostis@cs.ntua.gr" target="_blank">kostis@cs.ntua.gr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 05/21/2014 03:33 PM, Shayan Pooya wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
In this piece of code, dialyzer fails to detect unused variable RState:<br>
<a href="https://github.com/pooya/disco/blob/dialyzer_bug/master/src/disco_worker.erl#L235" target="_blank">https://github.com/pooya/<u></u>disco/blob/dialyzer_bug/<u></u>master/src/disco_worker.erl#<u></u>L235</a><br>
<br>
(The code should be changed to use _ instead of RState, but I left it<br>
like this to report this issue).<br>
<br>
Erlang versions prior to R16B03 seem to correctly detect and report this<br>
issue:<br>
<a href="https://travis-ci.org/pooya/disco/builds/25693989" target="_blank">https://travis-ci.org/pooya/<u></u>disco/builds/25693989</a><br>
<br>
Therefore, this seem to be an issue in dialyzer which is also present in<br>
Erlang 17.0<br>
</blockquote>
<br></div></div>
This is bit of a strange report since dialyzer does not really detect unused variables (and never has).  It's the Erlang compiler/linter that does this.<br>
<br>
Kostis<br>
______________________________<u></u>_________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org" target="_blank">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-bugs</a><br>
</blockquote></div><br></div>