ignorer les warnings inconnus (suggestion skaller)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6787 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2005-02-16 14:38:32 +00:00
parent 669b82bba4
commit 98a3ba915b
1 changed files with 4 additions and 9 deletions

View File

@ -68,20 +68,15 @@ let letter = function (* 'a' is all *)
| Unused_var_strict _ -> 'z'
;;
let check c =
try ignore (String.index "acdeflmpsuvxyzACDEFLMPSUVXYZ" c)
with _ -> raise (Arg.Bad (Printf.sprintf "unknown warning option %c" c))
;;
let active = Array.create 26 true;;
let error = Array.create 26 false;;
let active = Array.create 27 true;;
let error = Array.create 27 false;;
let translate c =
check c;
if c >= 'A' && c <= 'Z' then
(Char.code c - Char.code 'A', true)
else
else if c >= 'a' && c <= 'z' then
(Char.code c - Char.code 'a', false)
else (26, false)
;;
let is_active x =