basho / riak-erlang-client

The Riak client for Erlang.
Apache License 2.0
311 stars 188 forks source link

Dialyzer issues with 19.1 [JIRA: CLIENTS-1021] #324

Closed lukebakken closed 1 year ago

lukebakken commented 7 years ago

Also see #298

riakc_obj.erl:142: The variable O can never match since previous clauses completely covered the type {'error','zero_length_bucket' | 'zero_length_key'}
riakc_obj.erl:154: Record construction #riakc_obj{bucket::{_,_},key::'undefined' | binary(),vclock::'undefined',contents::[],updatemetadata::'undefined'} violates the declared type of field vclock::binary() and updatemetadata::dict:dict(binary(),binary())
riakc_obj.erl:156: Record construction #riakc_obj{bucket::binary(),key::'undefined' | binary(),vclock::'undefined',contents::[],updatemetadata::'undefined'} violates the declared type of field vclock::binary() and updatemetadata::dict:dict(binary(),binary())
riakc_obj.erl:292: The attempt to match a term of type dict:dict(binary(),binary()) against the pattern 'undefined' breaks the opaqueness of the term
riakc_obj.erl:308: The pattern 'undefined' can never match the type binary()
riakc_obj.erl:585: Function new_obj/4 has no local return
riakc_obj.erl:586: Record construction #riakc_obj{updatemetadata::'undefined',updatevalue::'undefined'} violates the declared type of field updatemetadata::dict:dict(binary(),binary()) and updatevalue::binary()
riakc_pb_socket.erl:1323: Function init/1 has no local return
riakc_pb_socket.erl:1326: Record construction #state{auto_reconnect::'false',queue_if_disconnected::'false',sock::'undefined',keepalive::'false',transport::'gen_tcp',queue::queue:queue(_),connects::0,failed::[],connect_timeout::'infinity',ssl_opts::[],reconnect_interval::100} violates the declared type of field sock::port() | {'sslsocket',_,_}
riakc_pb_socket.erl:1340: Guard test port() | {'sslsocket',_,_} =:= 'undefined' can never succeed
riakc_pb_socket.erl:1347: Guard test port() | {'sslsocket',_,_} =:= 'undefined' can never succeed
riakc_pb_socket.erl:1364: The pattern 'undefined' can never match the type port() | {'sslsocket',_,_}
riakc_pb_socket.erl:1831: The created fun has no local return
riakc_pb_socket.erl:1853: The created fun has no local return
riakc_pb_socket.erl:1869: The created fun has no local return
riakc_pb_socket.erl:2183: Function connect/1 has no local return
riakc_pb_socket.erl:2183: Guard test port() | {'sslsocket',_,_} =:= 'undefined' can never succeed
riakc_pb_socket.erl:2203: Function start_tls/1 will never be called
riakc_pb_socket.erl:2242: Function start_auth/1 will never be called
riakc_pb_socket.erl:2263: Function disconnect/1 has no local return
riakc_pb_socket.erl:2274: The pattern 'undefined' can never match the type port() | {'sslsocket',_,_}
riakc_pb_socket.erl:2282: Record construction #state{address::atom() | string() | {byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()},port::non_neg_integer(),auto_reconnect::boolean(),queue_if_disconnected::boolean(),sock::'undefined',keepalive::boolean(),transport::'gen_tcp' | 'ssl',queue::'undefined' | queue:queue(#request{ref::reference(),msg::atom() | tuple(),timeout::'infinity' | non_neg_integer(),tref::'undefined' | reference(),opts::[atom() | tuple()]}),connects::non_neg_integer(),failed::[{_,integer()}],connect_timeout::'infinity' | non_neg_integer(),credentials::'undefined' | {string(),string()},reconnect_interval::non_neg_integer()} violates the declared type of field sock::port() | {'sslsocket',_,_}
riakc_pb_socket.erl:2293: Function increase_reconnect_interval/1 will never be called
riakc_pb_socket.erl:2313: Record construction #state{address::atom() | string() | {byte(),byte(),byte(),byte()} | {char(),char(),char(),char(),char(),char(),char(),char()},port::non_neg_integer(),auto_reconnect::boolean(),queue_if_disconnected::boolean(),sock::'undefined',keepalive::boolean(),transport::'gen_tcp' | 'ssl',active::'undefined' | #request{ref::reference(),msg::atom() | tuple(),timeout::'infinity' | non_neg_integer(),tref::'undefined' | reference(),opts::[atom() | tuple()]},queue::'undefined' | queue:queue(#request{ref::reference(),msg::atom() | tuple(),timeout::'infinity' | non_neg_integer(),tref::'undefined' | reference(),opts::[atom() | tuple()]}),connects::non_neg_integer(),failed::[{_,integer()}],connect_timeout::'infinity' | non_neg_integer(),credentials::'undefined' | {string(),string()},reconnect_interval::non_neg_integer()} violates the declared type of field sock::port() | {'sslsocket',_,_}
riakc_pb_socket.erl:2337: Function maybe_enqueue_and_reconnect/2 will never be called
riakc_pb_socket.erl:2343: Function maybe_reconnect/1 will never be called
riakc_pb_socket.erl:2348: Function enqueue_or_reply_error/2 will never be called