diff options
author | Hans Bolinder <[email protected]> | 2013-04-22 15:28:49 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2013-05-06 12:14:12 +0200 |
commit | 21a7806986d58480367cff8d385a12f9659c7754 (patch) | |
tree | cba88bf517ff4f86b86bb0d649f5204bac4d9ade /lib/stdlib/src/dets_v9.erl | |
parent | 0dc5a00011d1d24b68c9d43ff608415f84c50499 (diff) | |
download | otp-21a7806986d58480367cff8d385a12f9659c7754.tar.gz otp-21a7806986d58480367cff8d385a12f9659c7754.tar.bz2 otp-21a7806986d58480367cff8d385a12f9659c7754.zip |
Fix unmatched_returns warnings in STDLIB and Kernel
Diffstat (limited to 'lib/stdlib/src/dets_v9.erl')
-rw-r--r-- | lib/stdlib/src/dets_v9.erl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/stdlib/src/dets_v9.erl b/lib/stdlib/src/dets_v9.erl index 308f81c23b..2af93ec800 100644 --- a/lib/stdlib/src/dets_v9.erl +++ b/lib/stdlib/src/dets_v9.erl @@ -284,9 +284,9 @@ %% -> ok | throw({NewHead,Error}) mark_dirty(Head) -> Dirty = [{?CLOSED_PROPERLY_POS, <<?NOT_PROPERLY_CLOSED:32>>}], - dets_utils:pwrite(Head, Dirty), - dets_utils:sync(Head), - dets_utils:position(Head, Head#head.freelists_p), + {_H, ok} = dets_utils:pwrite(Head, Dirty), + ok = dets_utils:sync(Head), + {ok, _Pos} = dets_utils:position(Head, Head#head.freelists_p), dets_utils:truncate(Head, cur). %% -> {ok, head()} | throw(Error) | throw(badarg) @@ -1385,13 +1385,13 @@ segment_file(SizeT, Head, FileData, SegEnd) -> case Data of {InFile,In0} -> {OutFile, Out} = temp_file(Head, SizeT, I), - file:close(In0), + _ = file:close(In0), {ok, In} = dets_utils:open(InFile, [raw,binary,read]), {ok, 0} = dets_utils:position(In, InFile, bof), seg_file(SegAddr, SegAddr, In, InFile, Out, OutFile, SizeT, SegEnd), - file:close(In), - file:delete(InFile), + _ = file:close(In), + _ = file:delete(InFile), {OutFile,Out}; Objects -> {LastAddr, B} = seg_file(Objects, SegAddr, SegAddr, SizeT, []), @@ -1702,7 +1702,7 @@ free_list_to_file(Ftab, H, Pos, Sz, Ws, WsSz) -> free_list_to_file(Ftab, H, Pos+1, Sz, NWs, NWsSz). free_lists_from_file(H, Pos) -> - dets_utils:position(H#head.fptr, H#head.filename, Pos), + {ok, Pos} = dets_utils:position(H#head.fptr, H#head.filename, Pos), FL = dets_utils:empty_free_lists(), case catch bin_to_tree([], H, start, FL, -1, []) of {'EXIT', _} -> |