From 9cb36ab840d502f51b589d8b811cd43e715b6122 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Wed, 4 Jul 2018 09:37:06 -0700 Subject: [PATCH] [minor] remove suspicious `with _ ->` Summary: These seem not useful. Reviewed By: mbouaziz Differential Revision: D8732676 fbshipit-source-id: ad13738 --- infer/src/biabduction/Prover.ml | 2 +- infer/src/java/jTrans.ml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) 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 =