diff --git a/utils/warnings.ml b/utils/warnings.ml index 70cd0589e..05aeb63ae 100644 --- a/utils/warnings.ml +++ b/utils/warnings.ml @@ -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 =