diff --git a/infer/src/biabduction/RetainCycles.ml b/infer/src/biabduction/RetainCycles.ml index 20c5da86a..117d4a0e6 100644 --- a/infer/src/biabduction/RetainCycles.ml +++ b/infer/src/biabduction/RetainCycles.ml @@ -238,7 +238,7 @@ let report_cycle tenv summary prop = unsafe_unretained fields. Otherwise we report a retain cycle. *) let cycles = get_retain_cycles tenv prop in RetainCyclesType.Set.iter RetainCyclesType.print_cycle cycles ; - if RetainCyclesType.Set.cardinal cycles > 0 then ( + if not (RetainCyclesType.Set.is_empty cycles) then ( RetainCyclesType.Set.iter (fun cycle -> let exn = exn_retain_cycle tenv cycle in diff --git a/infer/src/biabduction/SymExec.ml b/infer/src/biabduction/SymExec.ml index 00a56b7e4..86454bcb4 100644 --- a/infer/src/biabduction/SymExec.ml +++ b/infer/src/biabduction/SymExec.ml @@ -1960,7 +1960,7 @@ and sym_exec_wrapper exe_env handle_exn tenv summary proc_cfg instr (* Check for retain cycles after assignments and method calls *) ( match instr with | (Sil.Store _ | Sil.Call _) when !Config.footprint -> - List.iter ~f:(RetainCycles.report_cycle tenv summary) [p] + RetainCycles.report_cycle tenv summary p | _ -> () ) ; let node_has_abstraction node =