aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_dataflow.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-01-23 11:37:34 +0100
committerHans Bolinder <[email protected]>2018-01-23 11:37:34 +0100
commit716ef17d2a00c7f4a5a5cf92fffd18adb94c542d (patch)
treef517f0ae5ed2c1a6546d5d18df46dcfaf03935e1 /lib/dialyzer/src/dialyzer_dataflow.erl
parentb7ff9c0d76372f16d14ecaac04c6fbbbadaf9435 (diff)
parentdc6a03a8351819a91c1e9235dd84df0acd4ba6b8 (diff)
downloadotp-716ef17d2a00c7f4a5a5cf92fffd18adb94c542d.tar.gz
otp-716ef17d2a00c7f4a5a5cf92fffd18adb94c542d.tar.bz2
otp-716ef17d2a00c7f4a5a5cf92fffd18adb94c542d.zip
Merge branch 'maint'
* maint: kernel: Correct contracts and a bug in group_history stdlib: Correct contracts dialyzer: Optimize handling of a lot of warnings Conflicts: lib/kernel/src/erl_boot_server.erl
Diffstat (limited to 'lib/dialyzer/src/dialyzer_dataflow.erl')
-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 93cfea3c5e..384912f983 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -3117,7 +3117,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}.