Skip to content

Commit

Permalink
Disable some dialyzer warnings in riakc_pb_socket:process_response/3.
Browse files Browse the repository at this point in the history
Dialzyer produces errors such as the following because the code checks
for fields containing `undefined` when the spec does not allow it.

riakc_pb_socket.erl:1786: The pattern 'undefined' can never match the type [binary()]
  • Loading branch information
David Hull committed Jan 30, 2018
1 parent 589c1b5 commit c3f2979
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/riakc_pb_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@

-export_type([address/0, portnum/0]).

%% Disable "The pattern 'undefined' can never match the type [binary()]"
%% warnings in process_response/3:
-dialyzer({no_match, process_response/3}).

%% @private Like `gen_server:call/3', but with the timeout hardcoded
%% to `infinity'.
call_infinity(Pid, Msg) ->
Expand Down

0 comments on commit c3f2979

Please sign in to comment.