Skip to content

Commit 6ac5c54

Browse files
committed
Fix OTP-27 Dialyzer errors in trust_store_http
1 parent 079ad8b commit 6ac5c54

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

deps/trust_store_http/src/trust_store_http.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
main([]) ->
77
io:format("~nStarting trust store server ~n", []),
8-
application:ensure_all_started(trust_store_http),
8+
{ok, _} = application:ensure_all_started(trust_store_http),
99
io:format("~nTrust store server started on port ~tp ~n",
1010
[application:get_env(trust_store_http, port, undefined)]),
1111
user_drv:start(),
12-
timer:sleep(infinity).
12+
timer:sleep(infinity).

deps/trust_store_http/src/trust_store_http_app.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ start(_Type, _Args) ->
1515
{"/certs/[...]", cowboy_static,
1616
{dir, Directory, [{mimetypes, {<<"text">>, <<"html">>, []}}]}}]}
1717
]),
18-
case get_ssl_options() of
18+
_ = case get_ssl_options() of
1919
undefined -> start_http(Dispatch, Port);
2020
SslOptions -> start_https(Dispatch, Port, SslOptions)
2121
end,

deps/trust_store_http/src/trust_store_list_handler.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ respond(Files, Req, State) ->
2525
respond_error(Reason, Req, State) ->
2626
Error = io_lib:format("Error listing certificates ~tp", [Reason]),
2727
logger:log(error, "~ts", [Error]),
28-
Req2 = cowboy_req:reply(500, [], iolist_to_binary(Error), Req),
28+
Req2 = cowboy_req:reply(500, #{}, iolist_to_binary(Error), Req),
2929
{ok, Req2, State}.
3030

3131
json_encode(Files) ->
@@ -40,7 +40,6 @@ cert_id(FileName, FileDate, FileHash) ->
4040
cert_path(FileName) ->
4141
iolist_to_binary(["/certs/", FileName]).
4242

43-
-spec list_files(string()) -> [{string(), file:date_time(), integer()}].
4443
list_files(Directory) ->
4544
case file:list_dir(Directory) of
4645
{ok, FileNames} ->

0 commit comments

Comments
 (0)