diff --git a/infer/src/biabduction/Prover.ml b/infer/src/biabduction/Prover.ml index 6d269754e..9bd4b24c3 100644 --- a/infer/src/biabduction/Prover.ml +++ b/infer/src/biabduction/Prover.ml @@ -2552,7 +2552,7 @@ let check_array_bounds tenv (sub1, sub2) prop = (* L.d_strln_color Orange "check_bound "; Sil.d_exp len1; L.d_str " "; Sil.d_exp len2; L.d_ln(); *) let indices_to_check = - match len2 with _ -> [Exp.BinOp (Binop.PlusA, len2, Exp.minus_one)] + [Exp.BinOp (Binop.PlusA, len2, Exp.minus_one)] (* only check len *) in List.iter ~f:(fail_if_le len1) indices_to_check diff --git a/infer/src/java/jTrans.ml b/infer/src/java/jTrans.ml index 40868bfe9..59946cdd9 100644 --- a/infer/src/java/jTrans.ml +++ b/infer/src/java/jTrans.ml @@ -73,10 +73,8 @@ let get_exit_location source_file bytecode = let retrieve_fieldname fieldname = - try - let subs = Str.split (Str.regexp (Str.quote ".")) (Typ.Fieldname.to_string fieldname) in - List.last_exn subs - with _ -> assert false + let subs = Str.split (Str.regexp (Str.quote ".")) (Typ.Fieldname.to_string fieldname) in + List.last_exn subs let get_field_name program static tenv cn fs =