[Pkg-ocaml-maint-commits] [approx] 03/08: fix compiler warnings in test code
Eric Cooper
ecc at cmu.edu
Sun Jul 23 21:21:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
ecc-guest pushed a commit to branch master
in repository approx.
commit 853526c6030b0f82462db318b6ce069845078c61
Author: Eric Cooper <ecc at cmu.edu>
Date: Sat Jul 22 15:10:36 2017 -0400
fix compiler warnings in test code
---
tests/config_file_test.ml | 2 +-
tests/control_file_test.ml | 33 ++++++++++++++++-----------------
tests/testlib.ml | 4 ++--
tests/util_test.ml | 4 ++--
4 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/tests/config_file_test.ml b/tests/config_file_test.ml
index 5f43e7d..3bf3589 100644
--- a/tests/config_file_test.ml
+++ b/tests/config_file_test.ml
@@ -31,7 +31,7 @@ let create_good ctx =
close_out chan;
file
-let cleanup () ctx = Config_file.reset ()
+let cleanup () _ = Config_file.reset ()
let read_good ctx =
bracket
diff --git a/tests/control_file_test.ml b/tests/control_file_test.ml
index 283631e..b35929e 100644
--- a/tests/control_file_test.ml
+++ b/tests/control_file_test.ml
@@ -3,7 +3,6 @@
Released under the GNU General Public License *)
open OUnit2
-open Printf
open Testlib
let bad_line = "one two three"
@@ -15,22 +14,22 @@ let create_bad ctx =
file
let test_contents =
- "Origin: Debian
-Label: Debian
-Suite: stable
-Version: 8.1
-Codename: jessie
-Date: Sat, 06 Jun 2015 11:09:34 UTC
-Description: Debian 8.1 Released 06 June 2015
-MD5Sum:
- a2ff86b08a2f114d6f0594ff69ef5c4d 14019410 main/binary-all/Packages
- 9539760c49756bcaaf8640fd903ccbcf 92 main/binary-all/Release
-SHA1:
- 6b8b6dde32d863a7cde06b0c457b7ee4fb36bdbf 14019410 main/binary-all/Packages
- 98fcd7b597b05f3f86acb0ec07c4d11ddcb670c4 92 main/binary-all/Release
-SHA256:
- 299181e362caae665aa68399bacde59f439a41b900e903c7104feea7a8377af1 14019410 main/binary-all/Packages
- 84caeff910de244e607524c9b5fd370f064cbb849d3e67a8dac658cc21bba35c 92 main/binary-all/Release
+ "Origin: Debian\n\
+Label: Debian\n\
+Suite: stable\n\
+Version: 8.1\n\
+Codename: jessie\n\
+Date: Sat, 06 Jun 2015 11:09:34 UTC\n\
+Description: Debian 8.1 Released 06 June 2015\n\
+MD5Sum:\n\
+\ a2ff86b08a2f114d6f0594ff69ef5c4d 14019410 main/binary-all/Packages\n\
+\ 9539760c49756bcaaf8640fd903ccbcf 92 main/binary-all/Release\n\
+SHA1:\n\
+\ 6b8b6dde32d863a7cde06b0c457b7ee4fb36bdbf 14019410 main/binary-all/Packages\n\
+\ 98fcd7b597b05f3f86acb0ec07c4d11ddcb670c4 92 main/binary-all/Release\n\
+SHA256:\n\
+\ 299181e362caae665aa68399bacde59f439a41b900e903c7104feea7a8377af1 14019410 main/binary-all/Packages\n\
+\ 84caeff910de244e607524c9b5fd370f064cbb849d3e67a8dac658cc21bba35c 92 main/binary-all/Release\n\
"
let test_paragraph =
diff --git a/tests/testlib.ml b/tests/testlib.ml
index 6e0fc07..0147cbc 100644
--- a/tests/testlib.ml
+++ b/tests/testlib.ml
@@ -1,5 +1,5 @@
(* approx: proxy server for Debian archive files
- Copyright (C) 2015 Eric C. Cooper <ecc at cmu.edu>
+ Copyright (C) 2017 Eric C. Cooper <ecc at cmu.edu>
Released under the GNU General Public License *)
open OUnit
@@ -18,7 +18,7 @@ let p_exn = Printexc.to_string
let tear_down _ _ = ()
-let assert_invalid ?msg f =
+let assert_invalid f =
let result =
try f (); None
with e -> Some e
diff --git a/tests/util_test.ml b/tests/util_test.ml
index d5623a3..2d8383b 100644
--- a/tests/util_test.ml
+++ b/tests/util_test.ml
@@ -19,7 +19,7 @@ let create_non_empty_file ctx =
bracket
(fun ctx ->
let file, chan = bracket_tmpfile ctx in
- for i = 1 to 100 do
+ for _ = 1 to 100 do
output_string chan "All work and no play makes Jack a dull boy\n"
done;
close_out chan;
@@ -31,7 +31,7 @@ let create_tree ctx =
(fun ctx ->
let root = bracket_tmpdir ctx in
with_bracket_chdir ctx root
- (fun ctx ->
+ (fun _ ->
close_out (open_out "a");
Unix.mkdir "b" 0o755;
Unix.mkdir "c" 0o755;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/approx.git
More information about the Pkg-ocaml-maint-commits
mailing list