summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rwxr-xr-xboot/ocamldepbin300623 -> 298527 bytes
-rwxr-xr-xboot/ocamllexbin165419 -> 165431 bytes
-rw-r--r--utils/warnings.ml22
4 files changed, 10 insertions, 14 deletions
diff --git a/VERSION b/VERSION
index 858f08413..dd4ae5c00 100644
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
-3.12.0+dev12 (2009-12-01)
+3.12.0+dev13 (2009-12-22)
# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli
diff --git a/boot/ocamldep b/boot/ocamldep
index 178d8e4e8..ff3afb599 100755
--- a/boot/ocamldep
+++ b/boot/ocamldep
Binary files differ
diff --git a/boot/ocamllex b/boot/ocamllex
index 0db47b20f..123f7f15c 100755
--- a/boot/ocamllex
+++ b/boot/ocamllex
Binary files differ
diff --git a/utils/warnings.ml b/utils/warnings.ml
index 34e37a794..7a13c9079 100644
--- a/utils/warnings.ml
+++ b/utils/warnings.ml
@@ -129,13 +129,14 @@ let is_active x = active.(number x);;
let is_error x = error.(number x);;
let parse_opt flags s =
+ let check i =
+ if i < 1 || i > last_warning_number then
+ raise (Arg.Bad "Bad warning number");
+ in
let set i = flags.(i) <- true in
let clear i = flags.(i) <- false in
let set_all i = active.(i) <- true; error.(i) <- true in
- let error () =
- let msg = Printf.sprintf "Ill-formed list of warnings" in
- raise (Arg.Bad msg)
- in
+ let error () = raise (Arg.Bad "Ill-formed list of warnings") in
let rec loop i =
if i >= String.length s then () else
match s.[i] with
@@ -161,17 +162,12 @@ let parse_opt flags s =
loop (i+1)
| _ -> error ()
and loop_num myset i n =
- if i >= String.length s then begin
- if n < 1 || n > last_warning_number then begin
- let msg = Printf.sprintf "Bad warning number %d" n in
- raise (Arg.Bad msg)
- end else begin
- myset n
- end
- end else
+ if i >= String.length s then myset n else
match s.[i] with
| '0' .. '9' ->
- loop_num myset (i+1) (10 * n + Char.code s.[i] - Char.code '0')
+ let nn = 10 * n + Char.code s.[i] - Char.code '0' in
+ check nn;
+ loop_num myset (i+1) nn
| _ -> myset n; loop i
in
loop 0