aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_races.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-04-14 11:58:29 +0200
committerHans Bolinder <[email protected]>2014-04-14 11:58:29 +0200
commitb8494d9b7362f1edfb87f2dbd9f12e316ac71c1e (patch)
treeeb4fb1a8aeff6f981bc4176e1edfbfcd3a2024c5 /lib/dialyzer/src/dialyzer_races.erl
parentdf7dc4d8b6a2834136c5ffefb404009ce62ea939 (diff)
parentf789906490ac7854baa08663b344422340df9739 (diff)
downloadotp-b8494d9b7362f1edfb87f2dbd9f12e316ac71c1e.tar.gz
otp-b8494d9b7362f1edfb87f2dbd9f12e316ac71c1e.tar.bz2
otp-b8494d9b7362f1edfb87f2dbd9f12e316ac71c1e.zip
Merge branch 'kostis/dialyzer-warn_export_vars' into maint
* kostis/dialyzer-warn_export_vars: Correct the name of a compiler option and fix the corresponding warnings
Diffstat (limited to 'lib/dialyzer/src/dialyzer_races.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_races.erl16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/dialyzer/src/dialyzer_races.erl b/lib/dialyzer/src/dialyzer_races.erl
index b1f849b16f..28c2ad2c0b 100644
--- a/lib/dialyzer/src/dialyzer_races.erl
+++ b/lib/dialyzer/src/dialyzer_races.erl
@@ -990,8 +990,7 @@ fixup_race_forward_helper(CurrFun, CurrFunLabel, Fun, FunLabel,
NewRaceVarMap, Args, NewFunArgs, NewFunTypes, NestingLevel};
{CurrFun, Fun} ->
NewCallsToAnalyze = lists:delete(Head, CallsToAnalyze),
- NewRaceVarMap =
- race_var_map(Args, NewFunArgs, RaceVarMap, bind),
+ NewRaceVarMap = race_var_map(Args, NewFunArgs, RaceVarMap, bind),
RetC =
case Fun of
InitFun ->
@@ -1018,8 +1017,7 @@ fixup_race_forward_helper(CurrFun, CurrFunLabel, Fun, FunLabel,
label = FunLabel, var_map = NewRaceVarMap,
def_vars = Args, call_vars = NewFunArgs,
arg_types = NewFunTypes}|
- lists:reverse(StateRaceList)] ++
- RetC;
+ lists:reverse(StateRaceList)] ++ RetC;
_ ->
[#curr_fun{status = in, mfa = Fun,
label = FunLabel, var_map = NewRaceVarMap,
@@ -1054,13 +1052,9 @@ fixup_race_backward(CurrFun, Calls, CallsToAnalyze, Parents, Height) ->
false -> [CurrFun|Parents]
end;
[Head|Tail] ->
- MorePaths =
- case Head of
- {Parent, CurrFun} -> true;
- {Parent, _TupleB} -> false
- end,
- case MorePaths of
- true ->
+ {Parent, TupleB} = Head,
+ case TupleB =:= CurrFun of
+ true -> % more paths are needed
NewCallsToAnalyze = lists:delete(Head, CallsToAnalyze),
NewParents =
fixup_race_backward(Parent, NewCallsToAnalyze,