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 8d42c07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/riakc_pb_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,8 @@ counter_val_options([_ | _Rest], _Req) ->
-spec process_response(#request{}, rpb_resp(), #state{}) ->
{reply, term(), #state{}} |
{pending, #state{}}.
%% Disable "The pattern 'undefined' can never match the type [binary()]" warnings in process_response/3:
-dialyzer({no_match, process_response/3}).
process_response(#request{msg = rpbpingreq}, rpbpingresp, State) ->
{reply, pong, State};
process_response(#request{msg = rpbgetclientidreq},
Expand Down

0 comments on commit 8d42c07

Please sign in to comment.