Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pqwy committed Oct 16, 2016
1 parent d1e66d3 commit b1ad1e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bench/speed.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Time = struct

let time ~n f a =
let t1 = Sys.time () in
for i = 1 to n do ignore (f a) done ;
for _ = 1 to n do ignore (f a) done ;
let t2 = Sys.time () in
(t2 -. t1)

Expand Down
2 changes: 1 addition & 1 deletion tests/dsa_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2182,7 +2182,7 @@ let sha512_n256_cases2 =

let private_key ~p ~q ~g ~x ~y = priv_of_hex ~p ~q ~gg:g ~x ~y

let test_rfc6979 ~priv:({ Dsa.q; x } as priv) ~msg ~hash ~k ~r ~s _ =
let test_rfc6979 ~priv ~msg ~hash ~k ~r ~s _ =
let h1 = Hash.digest hash msg in
let k' =
let module H = (val (Hash.module_of hash)) in
Expand Down
12 changes: 6 additions & 6 deletions tests/testlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ let dh_shared_0 =
a5 23 69 38 7e ec b5 fc 4b 89 42 c4 32 fa e5 58
6f 39 5d a7 4e cd b5 da dc 1e 52 fe a4 33 72 c1
82 48 8a 5b c1 44 bc 60 9b 38 5b 80 5f 44 14 93"
and x = Cs.of_hex
and s = Cs.of_hex
"f9 47 87 95 d2 a1 6d d1 7c c8 a9 c0 71 28 a2 82
71 95 7e 79 87 0b fc 34 a2 42 ec 42 ac cc 42 81
7b f6 c4 f5 80 a9 70 e3 35 93 9b a3 21 81 a4 e3
Expand Down Expand Up @@ -290,7 +290,7 @@ let dh_shared_0 =
in
let grp = Dh.Group.oakley_5 in

match Dh.(shared grp (fst (key_of_secret grp x)) gy) with
match Dh.(shared grp (fst (key_of_secret grp ~s)) gy) with
| None -> assert_failure "degenerate shared secret"
| Some shared' ->
assert_cs_equal ~msg:"shared secret" shared shared'
Expand Down Expand Up @@ -877,16 +877,16 @@ let suite =
];

"RNG extraction" >::: [
random_n_selftest "int" Fc.Rng.int 1000 [
random_n_selftest ~typ:"int" Fc.Rng.int 1000 [
(1, 2); (0, 129); (7, 136); (0, 536870913);
] ;
random_n_selftest "int32" Fc.Rng.int32 1000 [
random_n_selftest ~typ:"int32" Fc.Rng.int32 1000 [
(7l, 136l); (0l, 536870913l);
] ;
random_n_selftest "int64" Fc.Rng.int64 1000 [
random_n_selftest ~typ:"int64" Fc.Rng.int64 1000 [
(7L, 136L); (0L, 536870913L); (0L, 2305843009213693953L);
] ;
random_n_selftest "Z" Fc.Rng.z 1000 [
random_n_selftest ~typ:"Z" Fc.Rng.z 1000 [
Z.(of_int 7, of_int 135);
Z.(of_int 0, of_int 536870913);
Z.(of_int 0, of_int64 2305843009213693953L)
Expand Down

0 comments on commit b1ad1e8

Please sign in to comment.