[erlang-questions] clarify: Dialyzer error/warinng for ssl_accept

Kostis Sagonas kostis@REDACTED
Fri Dec 23 12:18:46 CET 2011

On 12/23/11 12:00, Bengt Kleberg wrote:
> Greetings,
> To get working code we need to keep 'ok', but can we at the same time
> persuade Dialyzer not to complain?
> There are some emails that discuss the problem with Dialyzer
> error/warning for ssl_accept. They seem to concentrate upon the changed
> behaviour of ssl_accept/1 in different Erlang versions. So fist things
> first:
> We are running Erlang R14B01 (erts-5.8.2) [smp:2:2] [rq:2]
> [async-threads:0] [kernel-poll:false]
> Our code looks like this:
> case ssl:ssl_accept(Socket) of
> 	ok ->
> ...
> 	{error, Error} ->
> end
> Dialyzer says:
> sip_transport.erl:2207: The pattern 'ok' can never match the type
> {'error',_} | {'ok',{'sslsocket',_,_}}

There is no way to pursuade dialyzer not to complain without modifying 
the sources of R14B01.  If you want to do something like this, first 
check what the specs of the 'ssl' module specify and if the problem does 
not go away then check whether the wrong information is somewhere in 


More information about the erlang-questions mailing list