fix warnings

This commit is contained in:
Simon Cruanes 2025-03-19 13:39:15 -04:00
parent e177153f10
commit 75d90559bd
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -1,7 +1,5 @@
module S = Tiny_httpd module S = Tiny_httpd
module U = Tiny_httpd.Util
module D = Tiny_httpd.Dir module D = Tiny_httpd.Dir
module Pf = Printf
module Log = Tiny_httpd.Log module Log = Tiny_httpd.Log
let serve ~config ~timeout (dir : string) addr port j : _ result = let serve ~config ~timeout (dir : string) addr port j : _ result =
@ -9,9 +7,9 @@ let serve ~config ~timeout (dir : string) addr port j : _ result =
let after_init () = let after_init () =
Printf.printf "serve directory %s on http://%(%s%):%d\n%!" dir Printf.printf "serve directory %s on http://%(%s%):%d\n%!" dir
(if S.is_ipv6 server then (if S.is_ipv6 server then
"[%s]" "[%s]"
else else
"%s") "%s")
addr (S.port server) addr (S.port server)
in in
@ -63,9 +61,9 @@ let main () =
(fun b -> (fun b ->
config.dir_behavior <- config.dir_behavior <-
(if b then (if b then
Index_or_lists Index_or_lists
else else
Lists)), Lists)),
" <bool> automatically redirect to index.html if present" ); " <bool> automatically redirect to index.html if present" );
( "--delete", ( "--delete",
Unit (fun () -> config.delete <- true), Unit (fun () -> config.delete <- true),