aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-03-12 09:17:17 +0100
committerHans Bolinder <[email protected]>2014-03-20 16:00:26 +0100
commitce20094582493203c8812cd003e3d3b080f88607 (patch)
tree355a2fed2076173cde6ab1394542f67e17ba8a8a /lib/debugger
parent73af231f1a22083031df49ba19fdfd4f6b434a10 (diff)
downloadotp-ce20094582493203c8812cd003e3d3b080f88607.tar.gz
otp-ce20094582493203c8812cd003e3d3b080f88607.tar.bz2
otp-ce20094582493203c8812cd003e3d3b080f88607.zip
Fix some Dialyzer warnings
Dialyzer recognizes a certain pattern that makes it possible to get rid of 'The created fun has no local return' warnings.
Diffstat (limited to 'lib/debugger')
-rw-r--r--lib/debugger/src/dbg_iload.erl13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/debugger/src/dbg_iload.erl b/lib/debugger/src/dbg_iload.erl
index 266cf239dd..ad05a7c529 100644
--- a/lib/debugger/src/dbg_iload.erl
+++ b/lib/debugger/src/dbg_iload.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -42,18 +42,21 @@
load_mod(Mod, File, Binary, Db) ->
Flag = process_flag(trap_exit, true),
- Pid = spawn_link(fun () -> load_mod1(Mod, File, Binary, Db) end),
+ Pid = spawn_link(load_mod1(Mod, File, Binary, Db)),
receive
{'EXIT', Pid, What} ->
process_flag(trap_exit, Flag),
What
end.
--spec load_mod1(atom(), file:filename(), binary(), ets:tid()) -> no_return().
+-spec load_mod1(atom(), file:filename(), binary(), ets:tid()) ->
+ fun(() -> no_return()).
load_mod1(Mod, File, Binary, Db) ->
- store_module(Mod, File, Binary, Db),
- exit({ok, Mod}).
+ fun() ->
+ store_module(Mod, File, Binary, Db),
+ exit({ok, Mod})
+ end.
%%====================================================================
%% Internal functions