From 61777e73da821c51bb9cc9fe3833991326c12d8a Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Thu, 3 Feb 2022 21:52:59 -0500 Subject: [PATCH] Add a new known dialyzer warning Dialyzer complains about the yaws_config not being able to match the atom 'undefined' when it calls yaws_generated functions; this is because yaws_generated is generated code, as its name implies, so it handles constants as if they were variables. Ignore this complaint by adding it to known_dialyzer_warnings. Also in known_dialyzer_warnings, augment each regular expression to optionally match a column number. --- known_dialyzer_warnings | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/known_dialyzer_warnings b/known_dialyzer_warnings index 2766d0f8b..a938355ab 100644 --- a/known_dialyzer_warnings +++ b/known_dialyzer_warnings @@ -1,13 +1,14 @@ -yaws.erl:\d+: Guard test Ret *:: *'file' == 'fd' can never succeed -yaws.erl:\d+: Guard test Ret *:: *'file' == 'binfd' can never succeed -yaws_api.erl:\d+: The pattern 'false' can never match the type 'true' -yaws_ctl.erl:\d+: Function hup/1 has no local return -yaws_ctl.erl:\d+: Function stop/1 has no local return -yaws_ctl.erl:\d+: Function status/1 has no local return -yaws_ctl.erl:\d+: Function load/1 has no local return -yaws_ctl.erl:\d+: Function trace/1 has no local return -yaws_ctl.erl:\d+: Function debug_dump/1 has no local return -yaws_ctl.erl:\d+: Function stats/1 has no local return -yaws_ctl.erl:\d+: Function running_config/1 has no local return -yaws_revproxy.erl:\d+: The pattern 'true' can never match the type 'false' +yaws.erl:\d+(:\d+)?: Guard test Ret *:: *'file' == 'fd' can never succeed +yaws.erl:\d+(:\d+)?: Guard test Ret *:: *'file' == 'binfd' can never succeed +yaws_api.erl:\d+(:\d+)?: The pattern 'false' can never match the type 'true' +yaws_config.erl:\d+(:\d+)?: The pattern 'undefined' can never match the type \[47 \| 97 \| 99 \| 101 \| 108 \| 111 \| 114 \| 115 \| 116 \| 117, ...\] +yaws_ctl.erl:\d+(:\d+)?: Function hup/1 has no local return +yaws_ctl.erl:\d+(:\d+)?: Function stop/1 has no local return +yaws_ctl.erl:\d+(:\d+)?: Function status/1 has no local return +yaws_ctl.erl:\d+(:\d+)?: Function load/1 has no local return +yaws_ctl.erl:\d+(:\d+)?: Function trace/1 has no local return +yaws_ctl.erl:\d+(:\d+)?: Function debug_dump/1 has no local return +yaws_ctl.erl:\d+(:\d+)?: Function stats/1 has no local return +yaws_ctl.erl:\d+(:\d+)?: Function running_config/1 has no local return +yaws_revproxy.erl:\d+(:\d+)?: The pattern 'true' can never match the type 'false'