diff options
author | Hans Bolinder <[email protected]> | 2013-05-06 12:16:38 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2013-05-06 12:16:38 +0200 |
commit | 551d92fead40277f2152a7351ed6ab19b623b16b (patch) | |
tree | 7812afb9446ff1c7a8596a266a1cbd81eacc5f96 /lib/stdlib/src/supervisor.erl | |
parent | 0dc5a00011d1d24b68c9d43ff608415f84c50499 (diff) | |
parent | 2324dec9fb37e301413c74acf1dce8ae3c29fc48 (diff) | |
download | otp-551d92fead40277f2152a7351ed6ab19b623b16b.tar.gz otp-551d92fead40277f2152a7351ed6ab19b623b16b.tar.bz2 otp-551d92fead40277f2152a7351ed6ab19b623b16b.zip |
Merge branch 'hb/unmatched_returns/OTP-10908'
* hb/unmatched_returns/OTP-10908:
Fix unmatched_returns warnings in Kernel
Fix a minor bug in ets:tabfile_info() and ets:file2tab()
Fix unmatched_returns warning in Kernel
Fix unmatched_return warnings in sasl
Fix unmatched_return warnings in kernel
Fix unmatched_return warning in erl_prim_loader
Fix unmatched_return warnings in stdlib
Fix unmatched_returns warnings in STDLIB and Kernel
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r-- | lib/stdlib/src/supervisor.erl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl index 54328cd9ff..d18387568d 100644 --- a/lib/stdlib/src/supervisor.erl +++ b/lib/stdlib/src/supervisor.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -260,7 +260,7 @@ init_children(State, StartSpec) -> {ok, NChildren} -> {ok, State#state{children = NChildren}}; {error, NChildren, Reason} -> - terminate_children(NChildren, SupName), + _ = terminate_children(NChildren, SupName), {stop, {shutdown, Reason}} end; Error -> @@ -752,10 +752,16 @@ restart(Child, State) -> Id = if ?is_simple(State) -> Child#child.pid; true -> Child#child.name end, - timer:apply_after(0,?MODULE,try_again_restart,[self(),Id]), + {ok, _TRef} = timer:apply_after(0, + ?MODULE, + try_again_restart, + [self(),Id]), {ok,NState2}; {try_again, NState2, #child{name=ChName}} -> - timer:apply_after(0,?MODULE,try_again_restart,[self(),ChName]), + {ok, _TRef} = timer:apply_after(0, + ?MODULE, + try_again_restart, + [self(),ChName]), {ok,NState2}; Other -> Other @@ -850,7 +856,7 @@ terminate_children(Children, SupName) -> %% we do want them to be shut down as many functions from this module %% use this function to just clear everything. terminate_children([Child = #child{restart_type=temporary} | Children], SupName, Res) -> - do_terminate(Child, SupName), + _ = do_terminate(Child, SupName), terminate_children(Children, SupName, Res); terminate_children([Child | Children], SupName, Res) -> NChild = do_terminate(Child, SupName), @@ -1008,7 +1014,7 @@ wait_dynamic_children(_Child, _Pids, 0, undefined, EStack) -> wait_dynamic_children(_Child, _Pids, 0, TRef, EStack) -> %% If the timer has expired before its cancellation, we must empty the %% mail-box of the 'timeout'-message. - erlang:cancel_timer(TRef), + _ = erlang:cancel_timer(TRef), receive {timeout, TRef, kill} -> EStack |