Skip to content

Commit

Permalink
Silence some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
paurkedal committed Oct 26, 2017
1 parent 420b507 commit dc6dc1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/query.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(* Copyright (C) 2014--2016 Petter A. Urkedal <[email protected]>
(* Copyright (C) 2014--2017 Petter A. Urkedal <[email protected]>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -39,7 +39,7 @@ module Connection_utils (C : CONNECTION) = struct
| `Bytes -> csv_quoted (C.Tuple.bytes i r)
| `Date -> Cal.Printer.Date.to_string (C.Tuple.date i r)
| `Utc -> Cal.Printer.Calendar.to_string (C.Tuple.utc i r)
| `Other _ -> C.Tuple.other i r
| `Other _ -> C.Tuple.other i r [@ocaml.warning "-3"]
| `Unknown -> failwith "Cannot determine field type."
end

Expand Down
2 changes: 1 addition & 1 deletion tests/test_parallel_lwt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let rec test2 pool n =
if n = 0 then Lwt.return 0 else
if n = 1 then do_query pool else
let ns = Array.init (Random.int n * (Random.int n + 1) / n + 1)
(fun i -> Random.int n)
(fun _ -> Random.int n)
|> Array.to_list |> (fun xs -> n :: xs)
|> List.sort compare
|> list_diff (-)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_pool_lwt.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(* Copyright (C) 2014--2016 Petter A. Urkedal <[email protected]>
(* Copyright (C) 2014--2017 Petter A. Urkedal <[email protected]>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -31,7 +31,7 @@ let test n =
let a = Array.make n None in
let wait_count = ref 0 in
let wake j u = Lwt.wakeup u (); a.(j) <- None in
for i = 0 to n - 1 do
for _ = 0 to n - 1 do
let j = Random.int n in
assert (Pool.size pool = Hashtbl.length Resource.ht);
match a.(j) with
Expand All @@ -41,7 +41,7 @@ let test n =
Lwt.async
(fun () ->
Pool.use
(fun i -> waiter >>= fun () ->
(fun _ -> waiter >>= fun () ->
wait_count := pred !wait_count; Lwt.return_unit)
pool);
a.(j) <- Some waker
Expand Down

0 comments on commit dc6dc1a

Please sign in to comment.