Skip to content

Commit

Permalink
OCaml5: Annotate non-returning functions with types (#6081)
Browse files Browse the repository at this point in the history
These become warnings in ocaml 5.0+
  • Loading branch information
lindig authored Oct 24, 2024
2 parents 8768e7c + 0d26553 commit 8435a4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ocaml/xapi/xapi.ml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ let init_args () =
Xapi_globs.xenopsd_queues := ["xenopsd"]
)

let wait_to_die () =
let wait_to_die () : unit =
(* don't call Thread.join cos this interacts strangely with OCAML runtime and stops
the OCAML-level signal handlers ever getting called... Thread.delay is fine tho' *)
while true do
Expand Down
2 changes: 1 addition & 1 deletion ocaml/xapi/xapi_ha.ml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ let uuid_of_host_address address =
let on_master_failure () =
(* The plan is: keep asking if I should be the master. If I'm rejected then query the
live set and see if someone else has been marked as master, if so become a slave of them. *)
let become_master () =
let become_master () : unit =
info "This node will become the master" ;
Xapi_pool_transition.become_master () ;
info "Waiting for server restart" ;
Expand Down
2 changes: 1 addition & 1 deletion ocaml/xenopsd/cli/xn.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ let unix_proxy path =
| 0 ->
let buf = Bytes.make 16384 '\000' in
let accept, _ = Unix.accept listen in
let copy a b =
let copy a b : unit =
while true do
let n = Unix.read a buf 0 (Bytes.length buf) in
if n = 0 then exit 0 ;
Expand Down

0 comments on commit 8435a4e

Please sign in to comment.