Skip to content

Commit d8a6dac

Browse files
committed
Fix more Dialyzer warnings
1 parent a3233ed commit d8a6dac

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/rabbit_amqqueue_process.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,10 +1435,10 @@ handle_cast({force_event_refresh, Ref},
14351435
[emit_consumer_created(
14361436
Ch, CTag, false, AckRequired, QName, Prefetch,
14371437
Args, Ref, ActingUser) ||
1438-
{Ch, CTag, AckRequired, Prefetch, Args, ActingUser}
1438+
{Ch, CTag, AckRequired, Prefetch, _, _, Args, ActingUser}
14391439
<- AllConsumers];
14401440
{Ch, CTag} ->
1441-
[{Ch, CTag, AckRequired, Prefetch, Args, ActingUser}] = AllConsumers,
1441+
[{Ch, CTag, AckRequired, Prefetch, _, _, Args, ActingUser}] = AllConsumers,
14421442
emit_consumer_created(
14431443
Ch, CTag, true, AckRequired, QName, Prefetch, Args, Ref, ActingUser)
14441444
end,

src/rabbit_channel.erl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,7 @@ send(Command, #ch{writer_pid = WriterPid}) ->
758758
ok = rabbit_writer:send_command(WriterPid, Command).
759759

760760
format_soft_error(#amqp_error{name = N, explanation = E, method = M}) ->
761-
io_lib:format("operation ~s caused a channel exception ~s: ~ts", [M, N, E]);
762-
format_soft_error(Reason) ->
763-
Reason.
761+
io_lib:format("operation ~s caused a channel exception ~s: ~ts", [M, N, E]).
764762

765763
handle_exception(Reason, State = #ch{protocol = Protocol,
766764
channel = Channel,

src/rabbit_networking.erl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@
113113
_) ->
114114
'ok'.
115115

116+
%% @todo Remove once Dialyzer only runs on Erlang/OTP 21.3 or above.
117+
-dialyzer({nowarn_function, boot/0}).
118+
-dialyzer({nowarn_function, boot_listeners/3}).
119+
-dialyzer({nowarn_function, record_distribution_listener/0}).
120+
116121
%%----------------------------------------------------------------------------
117122

118123
boot() ->
@@ -295,9 +300,6 @@ tcp_listener_stopped(Protocol, Opts, IPAddress, Port) ->
295300
port = Port,
296301
opts = Opts}).
297302

298-
%% @todo Remove once Dialyzer only runs on Erlang/OTP 21.3 or above.
299-
-dialyzer({nowarn_function, record_distribution_listener/0}).
300-
301303
record_distribution_listener() ->
302304
{Name, Host} = rabbit_nodes:parts(node()),
303305
{port, Port, _Version} = erl_epmd:port_please(Name, Host),

0 commit comments

Comments
 (0)