aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-05-17 15:45:41 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-05-17 15:49:21 +0200
commit7153dd1f8baa77a6b2c2b29df56a2d0c41fa770b (patch)
tree1b91cdc0c95924f3223dc938e25ed42c1ac6b58c /lib/xmerl/src/xmerl_sax_parser_base.erlsrc
parent0545c22c9c07c55569e067c57ec184f018a54947 (diff)
downloadotp-7153dd1f8baa77a6b2c2b29df56a2d0c41fa770b.tar.gz
otp-7153dd1f8baa77a6b2c2b29df56a2d0c41fa770b.tar.bz2
otp-7153dd1f8baa77a6b2c2b29df56a2d0c41fa770b.zip
xmerl: Fix unmatched return warnings
Diffstat (limited to 'lib/xmerl/src/xmerl_sax_parser_base.erlsrc')
-rw-r--r--lib/xmerl/src/xmerl_sax_parser_base.erlsrc26
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/xmerl/src/xmerl_sax_parser_base.erlsrc b/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
index 200770a7cf..4d75805b9b 100644
--- a/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
+++ b/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
@@ -29,12 +29,10 @@
%%----------------------------------------------------------------------
%% External exports
%%----------------------------------------------------------------------
--export([
- parse/2,
+-export([parse/2,
parse_dtd/2,
is_name_char/1,
- is_name_start/1
- ]).
+ is_name_start/1]).
%%----------------------------------------------------------------------
%% Internal exports
@@ -1681,7 +1679,7 @@ handle_external_entity({file, FileToOpen}, State) ->
current_location=filename:dirname(FileToOpen),
entity=filename:basename(FileToOpen),
input_type=file}),
- file:close(FD),
+ ok = file:close(FD),
EntityState#xmerl_sax_parser_state.event_state
end;
handle_external_entity({http, Url}, State) ->
@@ -1700,8 +1698,8 @@ handle_external_entity({http, Url}, State) ->
current_location=filename:dirname(Url),
entity=filename:basename(Url),
input_type=file}),
- file:close(FD),
- file:delete(TmpFile),
+ ok = file:close(FD),
+ ok = file:delete(TmpFile),
EntityState#xmerl_sax_parser_state.event_state
end
catch
@@ -3471,17 +3469,17 @@ http_get_file(Host, Port, Key) ->
receive_msg(Socket, FD, true, SendTimeout)
catch
throw:{error, Error} ->
- file:close(FD),
- file:delete(Filename),
+ ok = file:close(FD),
+ ok = file:delete(Filename),
throw({error, Error})
end;
{error, _Reason} ->
- file:close(FD),
- file:delete(Filename),
+ ok = file:close(FD),
+ ok = file:delete(Filename),
throw({error, lists:flatten(io_lib:format("Couldn't fetch http://~s:~p/~s",
[Host, Port, Key]))})
end,
- file:close(FD),
+ ok = file:close(FD),
Filename.
%%----------------------------------------------------------------------
@@ -3498,11 +3496,11 @@ receive_msg(Socket, FD, WaitForHeader, Timeout) ->
{tcp_closed, Socket} ->
ok;
{tcp, Socket, Response} when WaitForHeader == false ->
- file:write(FD, Response),
+ ok = file:write(FD, Response),
receive_msg(Socket, FD, WaitForHeader, Timeout);
{tcp, Socket, Response} ->
MsgBody = remove_header(Response),
- file:write(FD, MsgBody),
+ ok = file:write(FD, MsgBody),
receive_msg(Socket, FD, false, Timeout);
{tcp_error, Socket, _Reason} ->
gen_tcp:close(Socket),