diff --git a/src/ejabberd_bosh.erl b/src/ejabberd_bosh.erl index f6ccb4887..c196c78ce 100644 --- a/src/ejabberd_bosh.erl +++ b/src/ejabberd_bosh.erl @@ -308,9 +308,9 @@ init([#body{attrs = Attrs}, IP, SID]) -> ignore end. -wait_for_session(_Event, State) -> +wait_for_session(Event, State) -> ?ERROR_MSG("Unexpected event in 'wait_for_session': ~p", - [_Event]), + [Event]), {next_state, wait_for_session, State}. wait_for_session(#body{attrs = Attrs} = Req, From, @@ -367,16 +367,16 @@ wait_for_session(#body{attrs = Attrs} = Req, From, reply_next_state(State4, Resp#body{els = RespEls}, RID, From) end; -wait_for_session(_Event, _From, State) -> +wait_for_session(Event, _From, State) -> ?ERROR_MSG("Unexpected sync event in 'wait_for_session': ~p", - [_Event]), + [Event]), {reply, {error, badarg}, wait_for_session, State}. active({#body{} = Body, From}, State) -> active1(Body, From, State); -active(_Event, State) -> +active(Event, State) -> ?ERROR_MSG("Unexpected event in 'active': ~p", - [_Event]), + [Event]), {next_state, active, State}. active(#body{attrs = Attrs, size = Size} = Req, From, @@ -408,9 +408,9 @@ active(#body{attrs = Attrs, size = Size} = Req, From, end; true -> active1(Req, From, State1) end; -active(_Event, _From, State) -> +active(Event, _From, State) -> ?ERROR_MSG("Unexpected sync event in 'active': ~p", - [_Event]), + [Event]), {reply, {error, badarg}, active, State}. active1(#body{attrs = Attrs} = Req, From, State) -> @@ -517,9 +517,9 @@ handle_event({activate, C2SPid}, StateName, handle_event({change_shaper, Shaper}, StateName, State) -> {next_state, StateName, State#state{shaper_state = Shaper}}; -handle_event(_Event, StateName, State) -> +handle_event(Event, StateName, State) -> ?ERROR_MSG("Unexpected event in '~ts': ~p", - [StateName, _Event]), + [StateName, Event]), {next_state, StateName, State}. handle_sync_event({send_xml, @@ -557,9 +557,9 @@ handle_sync_event(deactivate_socket, _From, StateName, StateData) -> {reply, ok, StateName, StateData#state{c2s_pid = undefined}}; -handle_sync_event(_Event, _From, StateName, State) -> +handle_sync_event(Event, _From, StateName, State) -> ?ERROR_MSG("Unexpected sync event in '~ts': ~p", - [StateName, _Event]), + [StateName, Event]), {reply, {error, badarg}, StateName, State}. handle_info({timeout, TRef, wait_timeout}, StateName, @@ -583,9 +583,9 @@ handle_info({timeout, TRef, shaper_timeout}, StateName, {stop, normal, State}; _ -> {next_state, StateName, State} end; -handle_info(_Info, StateName, State) -> +handle_info(Info, StateName, State) -> ?ERROR_MSG("Unexpected info:~n** Msg: ~p~n** StateName: ~p", - [_Info, StateName]), + [Info, StateName]), {next_state, StateName, State}. terminate(_Reason, _StateName, State) -> diff --git a/src/ejabberd_sql.erl b/src/ejabberd_sql.erl index 53c83bc4a..117609182 100644 --- a/src/ejabberd_sql.erl +++ b/src/ejabberd_sql.erl @@ -183,8 +183,8 @@ keep_alive(Host, Proc) -> Timeout) of {selected,_,[[<<"1">>]]} -> ok; - _Err -> - ?ERROR_MSG("Keep alive query failed, closing connection: ~p", [_Err]), + Err -> + ?ERROR_MSG("Keep alive query failed, closing connection: ~p", [Err]), sync_send_event(Proc, force_timeout, Timeout) end. diff --git a/src/ejabberd_websocket.erl b/src/ejabberd_websocket.erl index 57a3e9606..474a64c51 100644 --- a/src/ejabberd_websocket.erl +++ b/src/ejabberd_websocket.erl @@ -256,9 +256,9 @@ ws_loop(Codec, Socket, WsHandleLoopPid, SockMod, Shaper) -> "with pid ~p", [self()]), websocket_close(Codec, Socket, WsHandleLoopPid, SockMod, 1001); % going away - _Ignored -> + Ignored -> ?WARNING_MSG("Received unexpected message, ignoring: ~p", - [_Ignored]), + [Ignored]), ws_loop(Codec, Socket, WsHandleLoopPid, SockMod, Shaper) end. diff --git a/src/mod_bosh.erl b/src/mod_bosh.erl index 9b6e0eeaf..cd2fea99b 100644 --- a/src/mod_bosh.erl +++ b/src/mod_bosh.erl @@ -74,8 +74,8 @@ process([], #request{method = 'GET', data = <<>>}) -> {200, ?HEADER(?CT_XML), get_human_html_xmlel()}; process([], #request{method = 'OPTIONS', data = <<>>}) -> {200, ?OPTIONS_HEADER, []}; -process(_Path, _Request) -> - ?DEBUG("Bad Request: ~p", [_Request]), +process(_Path, Request) -> + ?DEBUG("Bad Request: ~p", [Request]), {400, ?HEADER(?CT_XML), #xmlel{name = <<"h1">>, attrs = [], children = [{xmlcdata, <<"400 Bad Request">>}]}}. diff --git a/src/mod_fail2ban.erl b/src/mod_fail2ban.erl index 3c15a0a59..3ed3a9810 100644 --- a/src/mod_fail2ban.erl +++ b/src/mod_fail2ban.erl @@ -139,8 +139,8 @@ handle_call(Request, From, State) -> ?WARNING_MSG("Unexpected call from ~p: ~p", [From, Request]), {noreply, State}. -handle_cast(_Msg, State) -> - ?WARNING_MSG("Unexpected cast = ~p", [_Msg]), +handle_cast(Msg, State) -> + ?WARNING_MSG("Unexpected cast = ~p", [Msg]), {noreply, State}. handle_info(clean, State) -> @@ -151,8 +151,8 @@ handle_info(clean, State) -> ets:fun2ms(fun({_, _, UnbanTS, _}) -> UnbanTS =< Now end)), erlang:send_after(?CLEAN_INTERVAL, self(), clean), {noreply, State}; -handle_info(_Info, State) -> - ?WARNING_MSG("Unexpected info = ~p", [_Info]), +handle_info(Info, State) -> + ?WARNING_MSG("Unexpected info = ~p", [Info]), {noreply, State}. terminate(_Reason, #state{host = Host}) -> diff --git a/src/mod_matrix_gw.erl b/src/mod_matrix_gw.erl index 80142ff49..28f1ccac1 100644 --- a/src/mod_matrix_gw.erl +++ b/src/mod_matrix_gw.erl @@ -386,8 +386,8 @@ process([<<"federation">>, <<"v2">>, <<"send_join">>, RoomID, EventID], {result, HTTPResult} -> HTTPResult end; -process(_Path, _Request) -> - ?DEBUG("matrix 404: ~p~n~p~n", [_Path, _Request]), +process(Path, Request) -> + ?DEBUG("matrix 404: ~p~n~p~n", [Path, Request]), ejabberd_web:error(not_found). preprocess_federation_request(Request) -> diff --git a/src/mod_offline_sql.erl b/src/mod_offline_sql.erl index 1f48b7ea9..ea4901539 100644 --- a/src/mod_offline_sql.erl +++ b/src/mod_offline_sql.erl @@ -127,8 +127,8 @@ remove_old_messages(Days, LServer) -> of {updated, N} -> ?INFO_MSG("~p message(s) deleted from offline spool", [N]); - _Error -> - ?ERROR_MSG("Cannot delete message in offline spool: ~p", [_Error]) + Error -> + ?ERROR_MSG("Cannot delete message in offline spool: ~p", [Error]) end, {atomic, ok}. diff --git a/src/mod_roster_sql.erl b/src/mod_roster_sql.erl index 565861751..2f159d681 100644 --- a/src/mod_roster_sql.erl +++ b/src/mod_roster_sql.erl @@ -340,16 +340,16 @@ update_roster_sql({LUser, LServer, SJID, Name, SSubscription, SAsk, AskMessage}, raw_to_record(LServer, [User, LServer, SJID, Nick, SSubscription, SAsk, SAskMessage, - _SServer, _SSubscribe, _SType]) -> + SServer, SSubscribe, SType]) -> raw_to_record(LServer, {User, LServer, SJID, Nick, SSubscription, SAsk, SAskMessage, - _SServer, _SSubscribe, _SType}); + SServer, SSubscribe, SType}); raw_to_record(LServer, {User, SJID, Nick, SSubscription, SAsk, SAskMessage, - _SServer, _SSubscribe, _SType}) -> + SServer, SSubscribe, SType}) -> raw_to_record(LServer, {User, LServer, SJID, Nick, SSubscription, SAsk, SAskMessage, - _SServer, _SSubscribe, _SType}); + SServer, SSubscribe, SType}); raw_to_record(LServer, {User, LServer, SJID, Nick, SSubscription, SAsk, SAskMessage, _SServer, _SSubscribe, _SType}) ->