Skip to content

Commit 0edba97

Browse files
author
Jacques Garrigue
committed
new warning for black holes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6703 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1 parent 6d1d85e commit 0edba97

12 files changed

Lines changed: 74 additions & 45 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ include stdlib/StdlibModules
1919

2020
CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot
2121
CAMLOPT=boot/ocamlrun ./ocamlopt -nostdlib -I stdlib
22-
COMPFLAGS=-warn-error Ay -w Y $(INCLUDES)
22+
COMPFLAGS=-warn-error Axy -w Y $(INCLUDES)
2323
LINKFLAGS=
2424

2525
CAMLYACC=boot/ocamlyacc

debugger/loadprinter.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ let install_printer ppf lid =
134134
raise(Error(Unavailable_module(s, lid))) in
135135
let print_function =
136136
if is_old_style then
137-
(fun formatter repr -> (Obj.obj v) (Obj.obj repr))
137+
(fun formatter repr -> Obj.obj v (Obj.obj repr))
138138
else
139-
(fun formatter repr -> (Obj.obj v) formatter (Obj.obj repr)) in
139+
(fun formatter repr -> Obj.obj v formatter (Obj.obj repr)) in
140140
Printval.install_printer path ty_arg ppf print_function
141141

142142
let remove_printer lid =

ocamldoc/odoc_texi.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ class text =
264264

265265
(** this method is not used here but is virtual
266266
in a class we will inherit later *)
267-
method label ?(no_ : bool option) (_ : string) =
268-
failwith "gni" ; ""
267+
method label ?(no_ : bool option) (_ : string) : string =
268+
failwith "gni"
269269

270270
(** Return the Texinfo code corresponding to the [text] parameter.*)
271271
method texi_of_text t =

otherlibs/dynlink/dynlink.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ let digest_interface unit loadpath =
114114
close_in ic;
115115
raise(Error(Corrupted_interface filename))
116116
end;
117-
input_value ic;
117+
ignore (input_value ic);
118118
let crc =
119119
match input_value ic with
120120
(_, crc) :: _ -> crc

otherlibs/labltk/jpf/fileselect.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ let subshell cmd =
5656
let r,w = pipe () in
5757
match fork () with
5858
0 -> close r; dup2 ~src:w ~dst:stdout;
59-
execv ~prog:"/bin/sh" ~args:[| "/bin/sh"; "-c"; cmd |];
60-
exit 127
59+
execv ~prog:"/bin/sh" ~args:[| "/bin/sh"; "-c"; cmd |]
6160
| id ->
6261
close w;
6362
let rc = in_channel_of_descr r in

otherlibs/labltk/jpf/shell.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let subshell cmd =
2222
match fork () with
2323
0 -> close r; dup2 w stdout;
2424
close stderr;
25-
execv "/bin/sh" [| "/bin/sh"; "-c"; cmd |]; exit 127
25+
execv "/bin/sh" [| "/bin/sh"; "-c"; cmd |]
2626
| id ->
2727
close w;
2828
let rc = in_channel_of_descr r in

otherlibs/threads/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CC=$(BYTECC)
1919
CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
2020
CAMLC=../../ocamlcomp.sh -I ../unix
2121
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
22-
COMPFLAGS=-warn-error Ay -w Y
22+
COMPFLAGS=-warn-error Axy -w Y
2323

2424
C_OBJS=scheduler.o
2525

otherlibs/unix/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)
2323
CAMLC=../../ocamlcomp.sh
2424
CAMLOPT=../../ocamlcompopt.sh
2525
MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
26-
COMPFLAGS=-warn-error Ay -w Y
26+
COMPFLAGS=-warn-error Axy -w Y
2727

2828
OBJS=accept.o access.o addrofstr.o alarm.o bind.o chdir.o chmod.o \
2929
chown.o chroot.o close.o closedir.o connect.o cst2constr.o cstringv.o \

testlabl/poly.exp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Objective Caml version 3.09+dev4 (2004-10-13)
1+
Objective Caml version 3.09+dev9 (2004-11-29)
22

33
# * * * # type 'a t = { t : 'a; }
44
# type 'a fold = { fold : 'b. f:('b -> 'a -> 'b) -> init:'b -> 'b; }
@@ -263,23 +263,23 @@ type 'a u = A of 'a t
263263
# - : t * [< `A | `B ] -> int = <fun>
264264
# - : [< `A | `B ] * t -> int = <fun>
265265
# Characters 0-41:
266-
Warning: this pattern-matching is not exhaustive.
266+
Warning P: this pattern-matching is not exhaustive.
267267
Here is an example of a value that is not matched:
268268
(`AnyExtraTag, `AnyExtraTag)
269269
- : [> `A | `B ] * [> `A | `B ] -> int = <fun>
270270
# Characters 0-29:
271-
Warning: this pattern-matching is not exhaustive.
271+
Warning P: this pattern-matching is not exhaustive.
272272
Here is an example of a value that is not matched:
273273
(_, 0)
274274
Characters 21-24:
275-
Warning: this match case is unused.
275+
Warning U: this match case is unused.
276276
- : [ `B ] * int -> int = <fun>
277277
# Characters 0-29:
278-
Warning: this pattern-matching is not exhaustive.
278+
Warning P: this pattern-matching is not exhaustive.
279279
Here is an example of a value that is not matched:
280280
(0, _)
281281
Characters 21-24:
282-
Warning: this match case is unused.
282+
Warning U: this match case is unused.
283283
- : int * [ `B ] -> int = <fun>
284284
# Characters 69-135:
285285
Constraints are not satisfied in this type.
@@ -318,8 +318,8 @@ type bt = 'a ca cb as 'a
318318
# val f : unit -> c = <fun>
319319
# val f : unit -> c = <fun>
320320
# Characters 11-60:
321-
Warning: the following private methods were made public implicitly:
322-
n
321+
Warning X: the following private methods were made public implicitly:
322+
n .
323323
val f : unit -> < m : int; n : int > = <fun>
324324
# Characters 11-56:
325325
This object is expected to have type c but has actually type

testlabl/poly.exp2

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Objective Caml version 3.09+dev4 (2004-10-13)
1+
Objective Caml version 3.09+dev9 (2004-11-29)
22

33
# * * * # type 'a t = { t : 'a; }
44
# type 'a fold = { fold : 'b. f:('b -> 'a -> 'b) -> init:'b -> 'b; }
@@ -144,9 +144,9 @@ This method has type 'a -> 'a which is less general than 'b. 'b -> 'b
144144
# Characters 24-28:
145145
This expression has type bool but is here used with type int
146146
# Characters 27-31:
147-
Warning: This use of a polymorphic method is not principal
147+
Warning X: this use of a polymorphic method is not principal.
148148
Characters 35-39:
149-
Warning: This use of a polymorphic method is not principal
149+
Warning X: this use of a polymorphic method is not principal.
150150
val f4 : id -> int * bool = <fun>
151151
# class c : object method m : #id -> int * bool end
152152
# class id2 : object method id : 'a -> 'a method mono : int -> int end
@@ -270,23 +270,23 @@ type 'a u = A of 'a t
270270
# - : t * [< `A | `B ] -> int = <fun>
271271
# - : [< `A | `B ] * t -> int = <fun>
272272
# Characters 0-41:
273-
Warning: this pattern-matching is not exhaustive.
273+
Warning P: this pattern-matching is not exhaustive.
274274
Here is an example of a value that is not matched:
275275
(`AnyExtraTag, `AnyExtraTag)
276276
- : [> `A | `B ] * [> `A | `B ] -> int = <fun>
277277
# Characters 0-29:
278-
Warning: this pattern-matching is not exhaustive.
278+
Warning P: this pattern-matching is not exhaustive.
279279
Here is an example of a value that is not matched:
280280
(_, 0)
281281
Characters 21-24:
282-
Warning: this match case is unused.
282+
Warning U: this match case is unused.
283283
- : [ `B ] * int -> int = <fun>
284284
# Characters 0-29:
285-
Warning: this pattern-matching is not exhaustive.
285+
Warning P: this pattern-matching is not exhaustive.
286286
Here is an example of a value that is not matched:
287287
(0, _)
288288
Characters 21-24:
289-
Warning: this match case is unused.
289+
Warning U: this match case is unused.
290290
- : int * [ `B ] -> int = <fun>
291291
# Characters 69-135:
292292
Constraints are not satisfied in this type.
@@ -325,8 +325,8 @@ type bt = 'a ca cb as 'a
325325
# val f : unit -> c = <fun>
326326
# val f : unit -> c = <fun>
327327
# Characters 11-60:
328-
Warning: the following private methods were made public implicitly:
329-
n
328+
Warning X: the following private methods were made public implicitly:
329+
n .
330330
val f : unit -> < m : int; n : int > = <fun>
331331
# Characters 11-56:
332332
This object is expected to have type c but has actually type

0 commit comments

Comments
 (0)