summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkjnilsson <knilsson@pivotal.io>2019-08-06 17:24:10 +0100
committerkjnilsson <knilsson@pivotal.io>2019-08-06 17:24:10 +0100
commit10cd51af4eb1a94e35bd2335ee2da3b922bb0c41 (patch)
tree2cd69cda6271b1c601ebfa8773ffbba4ea9ea027
parentf6ca77aa207d9b688bb605263717fc16eaca6efb (diff)
downloadrabbitmq-server-git-10cd51af4eb1a94e35bd2335ee2da3b922bb0c41.tar.gz
Dialyzer fixes
-rw-r--r--src/amqqueue_v1.erl2
-rw-r--r--src/rabbit_channel.erl1
-rw-r--r--src/rabbit_fifo.erl22
-rw-r--r--src/rabbit_quorum_queue.erl3
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 405f82269e..71dc5bbf80 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},