Skip to content

Commit a7461de

Browse files
committed
Fix OTP-27 Dialyzer errors in rabbit
1 parent 18b36fc commit a7461de

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

deps/rabbit/src/rabbit_channel_tracking.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ unregister_tracked_by_pid(ChPid) when node(ChPid) == node() ->
126126
case ets:lookup(?TRACKED_CHANNEL_TABLE, ChPid) of
127127
[] -> ok;
128128
[#tracked_channel{username = Username}] ->
129-
ets:update_counter(?TRACKED_CHANNEL_TABLE_PER_USER, Username, -1),
129+
_ = ets:update_counter(?TRACKED_CHANNEL_TABLE_PER_USER, Username, -1),
130130
ets:delete(?TRACKED_CHANNEL_TABLE, ChPid)
131131
end.
132132

@@ -139,7 +139,7 @@ unregister_tracked(ChId = {Node, _Name}) when Node == node() ->
139139
case get_tracked_channel_by_id(ChId) of
140140
[] -> ok;
141141
[#tracked_channel{pid = ChPid, username = Username}] ->
142-
ets:update_counter(?TRACKED_CHANNEL_TABLE_PER_USER, Username, -1),
142+
_ = ets:update_counter(?TRACKED_CHANNEL_TABLE_PER_USER, Username, -1),
143143
ets:delete(?TRACKED_CHANNEL_TABLE, ChPid)
144144
end.
145145

deps/rabbit/src/rabbit_connection_tracking.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ unregister_tracked(ConnId = {Node, _Name}) when Node =:= node() ->
151151
case ets:lookup(?TRACKED_CONNECTION_TABLE, ConnId) of
152152
[] -> ok;
153153
[#tracked_connection{vhost = VHost, username = Username}] ->
154-
ets:update_counter(?TRACKED_CONNECTION_TABLE_PER_USER, Username, -1),
155-
ets:update_counter(?TRACKED_CONNECTION_TABLE_PER_VHOST, VHost, -1),
154+
_ = ets:update_counter(?TRACKED_CONNECTION_TABLE_PER_USER, Username, -1),
155+
_ = ets:update_counter(?TRACKED_CONNECTION_TABLE_PER_VHOST, VHost, -1),
156156
ets:delete(?TRACKED_CONNECTION_TABLE, ConnId)
157157
end.
158158

deps/rabbit/src/rabbit_msg_store.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ internal_sync(State = #msstate { current_file_handle = CurHdl,
10501050
flying_write(Key, #msstate { flying_ets = FlyingEts }) ->
10511051
case ets:lookup(FlyingEts, Key) of
10521052
[{_, ?FLYING_WRITE}] ->
1053-
ets:update_counter(FlyingEts, Key, ?FLYING_WRITE_DONE),
1053+
_ = ets:update_counter(FlyingEts, Key, ?FLYING_WRITE_DONE),
10541054
%% We only remove the object if it hasn't changed
10551055
%% (a remove may be sent while we were processing the write).
10561056
true = ets:delete_object(FlyingEts, {Key, ?FLYING_IS_WRITTEN}),
@@ -1318,7 +1318,7 @@ update_msg_cache(CacheEts, MsgId, Msg) ->
13181318
%% but without the debug log that we don't want as the update is
13191319
%% more likely to fail following recent reworkings.
13201320
try
1321-
ets:update_counter(CacheEts, MsgId, {3, +1}),
1321+
_ = ets:update_counter(CacheEts, MsgId, {3, +1}),
13221322
ok
13231323
catch error:badarg ->
13241324
%% The entry must have been removed between

deps/rabbit/src/rabbit_time_travel_dbg.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ start(Pid, Apps) ->
2828
TracerPid = spawn_link(?MODULE, init, []),
2929
{ok, _} = dbg:tracer(process, {fun (Msg, _) -> TracerPid ! Msg end, []}),
3030
_ = [dbg:tpl(M, []) || M <- Mods],
31-
dbg:p(Pid, [c]),
31+
_ = dbg:p(Pid, [c]),
3232
ok.
3333

3434
apps_to_mods([], Acc) ->

0 commit comments

Comments
 (0)