diff options
author | Michael Klishin <mklishin@pivotal.io> | 2019-08-07 00:07:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 00:07:26 +0300 |
commit | e59dcbe3f4945ca19ae580acae6422ae7adc39a4 (patch) | |
tree | 0f4bf8e60a9c65be212a8fdf647489d17b9222b7 | |
parent | fa8ef2bf01dfe12d5a9e57aead4b3c99366fa5f5 (diff) | |
parent | 10cd51af4eb1a94e35bd2335ee2da3b922bb0c41 (diff) | |
download | rabbitmq-server-git-e59dcbe3f4945ca19ae580acae6422ae7adc39a4.tar.gz |
Merge pull request #2070 from rabbitmq/dialyzer-fixes
Dialyzer fixes
-rw-r--r-- | src/amqqueue_v1.erl | 2 | ||||
-rw-r--r-- | src/rabbit_channel.erl | 1 | ||||
-rw-r--r-- | src/rabbit_fifo.erl | 22 | ||||
-rw-r--r-- | src/rabbit_quorum_queue.erl | 3 |
4 files changed, 5 insertions, 23 deletions
diff --git a/src/amqqueue_v1.erl b/src/amqqueue_v1.erl index 9b739026c6..9760d752f7 100644 --- a/src/amqqueue_v1.erl +++ b/src/amqqueue_v1.erl @@ -90,6 +90,8 @@ qnode/1, macros/0]). +-dialyzer({nowarn_function, is_quorum/1}). + -define(record_version, ?MODULE). -record(amqqueue, { diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 9859641a00..b8869a23f3 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -2770,7 +2770,6 @@ maybe_monitor(QPid, QMons) when ?IS_CLASSIC(QPid) -> maybe_monitor(_, QMons) -> QMons. -maybe_monitor_all([], S) -> S; %% optimisation maybe_monitor_all([Item], S) -> maybe_monitor(Item, S); %% optimisation maybe_monitor_all(Items, S) -> lists:foldl(fun maybe_monitor/2, S, Items). diff --git a/src/rabbit_fifo.erl b/src/rabbit_fifo.erl index cfb1ac7fda..d9566ea8f7 100644 --- a/src/rabbit_fifo.erl +++ b/src/rabbit_fifo.erl @@ -64,9 +64,7 @@ make_credit/4, make_purge/0, make_purge_nodes/1, - make_update_config/1, - - from_log/2 + make_update_config/1 ]). %% command records representing all the protocol actions that are supported @@ -756,24 +754,6 @@ usage(Name) when is_atom(Name) -> [{_, Use}] -> Use end. -from_log(Log, State0) -> - lists:foldl( - fun ({Idx, Term, {'$usr', Meta0, Cmd, _}}, {S0, Effs}) -> - Meta = Meta0#{index => Idx, - term => Term}, - case apply(Meta, Cmd, S0) of - {S, _, E} when is_list(E) -> - {S, Effs ++ E}; - {S, _, E} -> - {S, Effs ++ [E]}; - {S, _} -> - {S, Effs} - end; - (_, Acc) -> - Acc - end, {State0, []}, Log). - - %%% Internal messages_ready(#?MODULE{messages = M, diff --git a/src/rabbit_quorum_queue.erl b/src/rabbit_quorum_queue.erl index 88b6e6aad4..cf54656e34 100644 --- a/src/rabbit_quorum_queue.erl +++ b/src/rabbit_quorum_queue.erl @@ -634,7 +634,8 @@ cluster_state(Name) -> end end. --spec status(rabbit_types:vhost(), Name :: rabbit_misc:resource_name()) -> rabbit_types:infos() | {error, term()}. +-spec status(rabbit_types:vhost(), Name :: rabbit_misc:resource_name()) -> + [[{binary(), term()}]] | {error, term()}. status(Vhost, QueueName) -> %% Handle not found queues QName = #resource{virtual_host = Vhost, name = QueueName, kind = queue}, |