Skip to content

Commit

Permalink
Fix dialyzer error
Browse files Browse the repository at this point in the history
Dialyzer identified the fact that the fload/6 match for
options_asterisk_methods could never be called, as it's handled
entirely within the server block, so remove it.
  • Loading branch information
vinoski committed Apr 3, 2021
1 parent 7affcb8 commit 5b72e04
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/yaws_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1358,20 +1358,6 @@ fload(FD, extra_response_headers, GC, C, Lno, Chars) ->
Err
end;

fload(FD, options_asterisk_methods, GC, C, Lno, Chars) ->
case toks(Lno, Chars) of
[] ->
C1 = C#sconf{options_asterisk_methods = []},
fload(FD, options_asterisk_methods, GC, C1, Lno+1, ?NEXTLINE);
[Methods] ->
C1 = C#sconf{options_asterisk_methods = Methods},
fload(FD, options_asterisk_methods, GC, C1, Lno+1, ?NEXTLINE);
[H|T] ->
{error, ?F("Unexpected input ~p at line ~w", [[H|T], Lno])};
Err ->
Err
end;

fload(FD, server, GC, C, Lno, eof) ->
file:close(FD),
{ok, GC, C, Lno, eof};
Expand Down

0 comments on commit 5b72e04

Please sign in to comment.