From fea31e77b0bf8d8134377ff90d801504bfdb4a0a Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 24 Feb 2011 13:29:06 +0100 Subject: Fix debugger warnings --- lib/debugger/src/dbg_ui_view.erl | 13 ++++++++----- lib/debugger/src/dbg_wx_view.erl | 11 +++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'lib/debugger') diff --git a/lib/debugger/src/dbg_ui_view.erl b/lib/debugger/src/dbg_ui_view.erl index 7350a830a8..be998f22ff 100644 --- a/lib/debugger/src/dbg_ui_view.erl +++ b/lib/debugger/src/dbg_ui_view.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-2011. 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,6 +42,9 @@ start(GS, Mod) -> false -> spawn(fun () -> init(GS, Mod, Title) end) end. +-spec stop() -> no_return(). +stop() -> + exit(stop). %%==================================================================== %% Main loop and message handling @@ -90,7 +93,7 @@ loop(State) -> dbg_ui_winman:update_windows_menu(Data), loop(State); {dbg_ui_winman, destroy} -> - exit(stop); + stop(); %% Help window termination -- ignore {'EXIT', _Pid, _Reason} -> @@ -104,7 +107,7 @@ gui_cmd(ignore, State) -> gui_cmd({win, Win}, State) -> State#state{win=Win}; gui_cmd(stopped, _State) -> - exit(stop); + stop(); gui_cmd({coords, Coords}, State) -> State#state{coords=Coords}; @@ -115,8 +118,8 @@ gui_cmd({shortcut, Key}, State) -> end; %% File menu -gui_cmd('Close', State) -> - gui_cmd(stopped, State); +gui_cmd('Close', _State) -> + stop(); %% Edit menu gui_cmd('Go To Line...', State) -> diff --git a/lib/debugger/src/dbg_wx_view.erl b/lib/debugger/src/dbg_wx_view.erl index 8ff89a4847..6242b9d0e0 100644 --- a/lib/debugger/src/dbg_wx_view.erl +++ b/lib/debugger/src/dbg_wx_view.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-2011. 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 @@ -46,6 +46,9 @@ start(GS, Mod) -> spawn_link(fun () -> init(GS, Env, Mod, Title) end) end. +-spec stop() -> no_return(). +stop() -> + exit(normal). %%==================================================================== %% Main loop and message handling @@ -113,13 +116,13 @@ loop(State) -> end. %%--Commands from the GUI--------------------------------------------- - + gui_cmd(ignore, State) -> State; gui_cmd({win, Win}, State) -> State#state{win=Win}; gui_cmd(stopped, _State) -> - exit(normal); + stop(); gui_cmd({coords, Coords}, State) -> State#state{coords=Coords}; @@ -132,7 +135,7 @@ gui_cmd({shortcut, Key}, State) -> %% File menu gui_cmd('Close', State) -> dbg_wx_trace_win:stop(State#state.win), - gui_cmd(stopped, State); + stop(); %% Edit menu gui_cmd('Go To Line', State) -> -- cgit v1.2.3