Skip to content

Commit

Permalink
Merge pull request #899 from raphael-proust/fix-some-warnings
Browse files Browse the repository at this point in the history
Core: remove some `mutable` to fix warning
  • Loading branch information
smorimoto authored Nov 7, 2021
2 parents b88ed83 + 2424653 commit af835c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/lwt_mutex.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module Lwt_sequence = Lwt_sequence

open Lwt.Infix

type t = { mutable locked : bool; mutable waiters : unit Lwt.u Lwt_sequence.t }
type t = { mutable locked : bool; waiters : unit Lwt.u Lwt_sequence.t }

let create () = { locked = false; waiters = Lwt_sequence.create () }

Expand Down
4 changes: 2 additions & 2 deletions src/core/lwt_sequence.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type 'a t = {
}

type 'a node = {
mutable node_prev : 'a t;
mutable node_next : 'a t;
node_prev : 'a t;
node_next : 'a t;
mutable node_data : 'a;
mutable node_active : bool;
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/lwt_stream.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type push = {
(* Thread signaled when a new element is added to the stream. *)
mutable push_waiting : bool;
(* Is a thread waiting on [push_signal] ? *)
mutable push_external : Obj.t;
mutable push_external : Obj.t [@ocaml.warning "-69"];
(* Reference to an external source. *)
}

Expand All @@ -66,7 +66,7 @@ type 'a push_bounded = {
mutable pushb_push_waiter : unit Lwt.t;
mutable pushb_push_wakener : unit Lwt.u;
(* Thread blocked on push. *)
mutable pushb_external : Obj.t;
mutable pushb_external : Obj.t [@ocaml.warning "-69"];
(* Reference to an external source. *)
}

Expand Down

0 comments on commit af835c5

Please sign in to comment.