aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-01-23 11:34:18 +0100
committerHans Bolinder <[email protected]>2018-01-23 11:34:18 +0100
commitdc6a03a8351819a91c1e9235dd84df0acd4ba6b8 (patch)
tree0dfd2c3c3cbf86656929d5a0e140f7825fc8d1dd /lib/dialyzer
parent7a37e39d45597a25ff532751c5131938b5286331 (diff)
parent6deabadcda913b4fd7f3d209e4344f0b0f736e85 (diff)
downloadotp-dc6a03a8351819a91c1e9235dd84df0acd4ba6b8.tar.gz
otp-dc6a03a8351819a91c1e9235dd84df0acd4ba6b8.tar.bz2
otp-dc6a03a8351819a91c1e9235dd84df0acd4ba6b8.zip
Merge branch 'hasse/kernel-stdlib/fix_contracts/OTP-14889' into maint
* hasse/kernel-stdlib/fix_contracts/OTP-14889: kernel: Correct contracts and a bug in group_history stdlib: Correct contracts dialyzer: Optimize handling of a lot of warnings
Diffstat (limited to 'lib/dialyzer')
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 8367432ac5..f6433a807d 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -3116,7 +3116,10 @@ state__add_warning(#state{warnings = Warnings, warning_mode = true} = State,
state__remove_added_warnings(OldState, NewState) ->
#state{warnings = OldWarnings} = OldState,
#state{warnings = NewWarnings} = NewState,
- {NewWarnings -- OldWarnings, NewState#state{warnings = OldWarnings}}.
+ case NewWarnings =:= OldWarnings of
+ true -> {[], NewState};
+ false -> {NewWarnings -- OldWarnings, NewState#state{warnings = OldWarnings}}
+ end.
state__add_warnings(Warns, #state{warnings = Warnings} = State) ->
State#state{warnings = Warns ++ Warnings}.