Skip to content

Commit 753c999

Browse files
committed
Fix compiler warnings
1 parent 1e8ebbb commit 753c999

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,13 @@ error_frame(Condition, Fmt, Args) ->
279279

280280
handle_exception(State = #v1{connection_state = closed}, Channel,
281281
#'v1_0.error'{description = {utf8, Desc}}) ->
282-
rabbit_log_connection:error("AMQP 1.0 connection ~p (~p), channel ~p - error:~n~p~n",
282+
_ = rabbit_log_connection:error("AMQP 1.0 connection ~p (~p), channel ~p - error:~n~p~n",
283283
[self(), closed, Channel, Desc]),
284284
State;
285285
handle_exception(State = #v1{connection_state = CS}, Channel,
286286
ErrorFrame = #'v1_0.error'{description = {utf8, Desc}})
287287
when ?IS_RUNNING(State) orelse CS =:= closing ->
288-
rabbit_log_connection:error("AMQP 1.0 connection ~p (~p), channel ~p - error:~n~p~n",
288+
_ = rabbit_log_connection:error("AMQP 1.0 connection ~p (~p), channel ~p - error:~n~p~n",
289289
[self(), CS, Channel, Desc]),
290290
%% TODO: session errors shouldn't force the connection to close
291291
State1 = close_connection(State),
@@ -421,8 +421,8 @@ handle_1_0_connection_frame(#'v1_0.open'{ max_frame_size = ClientFrameMax,
421421
undefined -> undefined;
422422
{utf8, Val} -> Val
423423
end,
424-
rabbit_log:debug("AMQP 1.0 connection.open frame: hostname = ~s, extracted vhost = ~s, idle_timeout = ~p" ,
425-
[HostnameVal, vhost(Hostname), HeartbeatSec * 1000]),
424+
_ = rabbit_log:debug("AMQP 1.0 connection.open frame: hostname = ~s, extracted vhost = ~s, idle_timeout = ~p" ,
425+
[HostnameVal, vhost(Hostname), HeartbeatSec * 1000]),
426426
%% TODO enforce channel_max
427427
ok = send_on_channel0(
428428
Sock,
@@ -715,7 +715,7 @@ send_to_new_1_0_session(Channel, Frame, State) ->
715715
put({ch_fr_pid, ChFrPid}, {channel, Channel}),
716716
ok = rabbit_amqp1_0_session:process_frame(ChFrPid, Frame);
717717
{error, {not_allowed, _}} ->
718-
rabbit_log:error("AMQP 1.0: user '~s' is not allowed to access virtual host '~s'",
718+
_ = rabbit_log:error("AMQP 1.0: user '~s' is not allowed to access virtual host '~s'",
719719
[User#user.username, vhost(Hostname)]),
720720
%% Let's skip the supervisor trace, this is an expected error
721721
throw({error, {not_allowed, User#user.username}});

deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_session_process.erl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ init({Channel, ReaderPid, WriterPid, #user{username = Username}, VHost,
5757
session = rabbit_amqp1_0_session:init(Channel)
5858
}};
5959
{error, Reason} ->
60-
rabbit_log:warning("Closing session for connection ~p:~n~p~n",
61-
[ReaderPid, Reason]),
60+
_ = rabbit_log:warning("Closing session for connection ~p:~n~p~n",
61+
[ReaderPid, Reason]),
6262
{stop, Reason}
6363
end;
6464
{error, Reason} ->
65-
rabbit_log:warning("Closing session for connection ~p:~n~p~n",
66-
[ReaderPid, Reason]),
65+
_ = rabbit_log:warning("Closing session for connection ~p:~n~p~n",
66+
[ReaderPid, Reason]),
6767
{stop, Reason}
6868
end.
6969

@@ -94,8 +94,8 @@ handle_info({#'basic.deliver'{ consumer_tag = ConsumerTag,
9494
case get({out, Handle}) of
9595
undefined ->
9696
%% TODO handle missing link -- why does the queue think it's there?
97-
rabbit_log:warning("Delivery to non-existent consumer ~p",
98-
[ConsumerTag]),
97+
_ = rabbit_log:warning("Delivery to non-existent consumer ~p",
98+
[ConsumerTag]),
9999
{noreply, State};
100100
Link ->
101101
{ok, Frames, Session1} =
@@ -158,8 +158,8 @@ handle_info({'DOWN', _MRef, process, Ch, Reason},
158158
io_lib:format("~w", [Reason])))}}
159159
end,
160160
End = #'v1_0.end'{ error = Error },
161-
rabbit_log:warning("Closing session for connection ~p:~n~p~n",
162-
[ReaderPid, Reason]),
161+
_ = rabbit_log:warning("Closing session for connection ~p:~n~p~n",
162+
[ReaderPid, Reason]),
163163
ok = rabbit_amqp1_0_writer:send_command_sync(Sock, End),
164164
{stop, normal, State};
165165
handle_info({'DOWN', _MRef, process, _QPid, _Reason}, State) ->
@@ -186,8 +186,8 @@ handle_cast({frame, Frame, FlowPid},
186186
catch exit:Reason = #'v1_0.error'{} ->
187187
%% TODO shut down nicely like rabbit_channel
188188
End = #'v1_0.end'{ error = Reason },
189-
rabbit_log:warning("Closing session for connection ~p:~n~p~n",
190-
[ReaderPid, Reason]),
189+
_ = rabbit_log:warning("Closing session for connection ~p:~n~p~n",
190+
[ReaderPid, Reason]),
191191
ok = rabbit_amqp1_0_writer:send_command_sync(Sock, End),
192192
{stop, normal, State};
193193
exit:normal ->
@@ -320,7 +320,7 @@ handle_control(Flow = #'v1_0.flow'{},
320320
undefined ->
321321
case get({out, Handle}) of
322322
undefined ->
323-
rabbit_log:warning("Flow for unknown link handle ~p", [Flow]),
323+
_ = rabbit_log:warning("Flow for unknown link handle ~p", [Flow]),
324324
protocol_error(?V_1_0_AMQP_ERROR_INVALID_FIELD,
325325
"Unattached handle: ~p", [Handle]);
326326
Out ->

deps/rabbitmq_shovel/src/rabbit_shovel_dyn_worker_sup_sup.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ adjust(Name, Def) ->
3636
start_child(Name, Def).
3737

3838
start_child({VHost, ShovelName} = Name, Def) ->
39-
rabbit_log_shovel:debug("Asked to start a dynamic Shovel named '~s' in virtual host '~s'", [ShovelName, VHost]),
39+
_ = rabbit_log_shovel:debug("Asked to start a dynamic Shovel named '~s' in virtual host '~s'", [ShovelName, VHost]),
4040
LockId = rabbit_shovel_locks:lock(Name),
4141
cleanup_specs(),
42-
rabbit_log_shovel:debug("Starting a mirrored supervisor named '~s' in virtual host '~s'", [ShovelName, VHost]),
42+
_ = rabbit_log_shovel:debug("Starting a mirrored supervisor named '~s' in virtual host '~s'", [ShovelName, VHost]),
4343
Result = case mirrored_supervisor:start_child(
4444
?SUPERVISOR,
4545
{Name, {rabbit_shovel_dyn_worker_sup, start_link, [Name, Def]},
@@ -56,7 +56,7 @@ child_exists(Name) ->
5656
mirrored_supervisor:which_children(?SUPERVISOR)).
5757

5858
stop_child({VHost, ShovelName} = Name) ->
59-
rabbit_log_shovel:debug("Asked to stop a dynamic Shovel named '~s' in virtual host '~s'", [ShovelName, VHost]),
59+
_ = rabbit_log_shovel:debug("Asked to stop a dynamic Shovel named '~s' in virtual host '~s'", [ShovelName, VHost]),
6060
LockId = rabbit_shovel_locks:lock(Name),
6161
case get({shovel_worker_autodelete, Name}) of
6262
true -> ok; %% [1]

0 commit comments

Comments
 (0)