Skip to content

Commit 0defe4c

Browse files
Merge pull request #7035 from rabbitmq/mergify/bp/v3.11.x/pr-6881
Fix all dialyzer warnings in `rabbitmq_stomp` (backport #6881)
2 parents c6dfe2f + a6e7796 commit 0defe4c

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/info_keys.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defmodule RabbitMQ.CLI.Ctl.InfoKeys do
1717
validate_info_keys(args, valid_keys, [])
1818
end
1919

20-
@spec validate_info_keys([charlist], [charlist], aliases) ::
20+
@spec validate_info_keys([charlist], [charlist | atom], aliases) ::
2121
{:ok, info_keys} | {:validation_failure, any}
2222
def validate_info_keys(args, valid_keys, aliases) do
2323
info_keys = prepare_info_keys(args, aliases)

deps/rabbitmq_stomp/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ plt(
7878
dialyze(
7979
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
8080
plt = ":base_plt",
81-
warnings_as_errors = False,
8281
)
8382

8483
broker_for_integration_suites()

deps/rabbitmq_stomp/src/rabbit_stomp_internal_event_handler.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ handle_event(_Event, State) ->
2525
{ok, State}.
2626

2727
handle_call(_Request, State) ->
28-
{ok, State}.
28+
{ok, ok, State}.
2929

3030
handle_info(_Info, State) ->
3131
{ok, State}.

deps/rabbitmq_stomp/src/rabbit_stomp_reader.erl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ init([SupHelperPid, Ref, Configuration]) ->
8383
conserve_resources = false,
8484
recv_outstanding = false})), #reader_state.stats_timer),
8585
{backoff, 1000, 1000, 10000});
86-
{network_error, Reason} ->
87-
rabbit_net:fast_close(RealSocket),
88-
terminate({shutdown, Reason}, undefined);
8986
{error, enotconn} ->
9087
rabbit_net:fast_close(RealSocket),
9188
terminate(shutdown, undefined);
@@ -284,7 +281,7 @@ run_socket(State = #reader_state{state = blocked}) ->
284281
run_socket(State = #reader_state{recv_outstanding = true}) ->
285282
State;
286283
run_socket(State = #reader_state{socket = Sock}) ->
287-
rabbit_net:setopts(Sock, [{active, once}]),
284+
_ = rabbit_net:setopts(Sock, [{active, once}]),
288285
State#reader_state{recv_outstanding = true}.
289286

290287

deps/rabbitmq_stomp/src/rabbit_stomp_sup.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ init([{Listeners, SslListeners0}, Configuration]) ->
4545
SslListeners)}}.
4646

4747
stop_listeners() ->
48-
rabbit_networking:stop_ranch_listener_of_protocol(?TCP_PROTOCOL),
49-
rabbit_networking:stop_ranch_listener_of_protocol(?TLS_PROTOCOL),
48+
_ = rabbit_networking:stop_ranch_listener_of_protocol(?TCP_PROTOCOL),
49+
_ = rabbit_networking:stop_ranch_listener_of_protocol(?TLS_PROTOCOL),
5050
ok.
5151

5252
%%

0 commit comments

Comments
 (0)