diff --git a/infer/src/Makefile.in b/infer/src/Makefile.in index e32b44ae6..6322ba480 100644 --- a/infer/src/Makefile.in +++ b/infer/src/Makefile.in @@ -90,8 +90,10 @@ OCAMLBUILD_OPTIONS = \ -cflags -w,@19 \ -cflags -w,@20 \ -cflags -w,@26 \ + -cflags -w,@35 \ -cflags -w,@38 \ -cflags -w,@39 \ + -tag-line "<*clang/clang_ast_*>: warn(-35-39)" \ -lflags $(OCAML_INCLUDES) \ -cflags $(OCAML_INCLUDES) \ $(addprefix -lib ,$(OCAML_LIBS)) \ diff --git a/infer/src/backend/inferanalyze.ml b/infer/src/backend/inferanalyze.ml index 29e72f87c..56c1de13c 100644 --- a/infer/src/backend/inferanalyze.ml +++ b/infer/src/backend/inferanalyze.ml @@ -26,11 +26,11 @@ module Codegen = struct for file_nr = 1 to num_files do let fname = Printf.sprintf "file%04d.c" file_nr in let fmt = open_out fname in - for i = 1 to num_functions do + for _ = 1 to num_functions do incr fun_nr; let num_calls = if !fun_nr = 1 then 0 else Random.int calls_per_fun in Printf.fprintf fmt "void f%04d() {\n" !fun_nr; - for call_nr = 1 to num_calls do + for _ = 1 to num_calls do let callee_nr = 1 + Random.int (max 1 (num_calls - 1)) in Printf.fprintf fmt "f%04d();\n" callee_nr done; diff --git a/infer/src/backend/inferprint.ml b/infer/src/backend/inferprint.ml index 96cb2055c..aee55f7fa 100644 --- a/infer/src/backend/inferprint.ml +++ b/infer/src/backend/inferprint.ml @@ -839,7 +839,7 @@ module Stats = struct let res = ref [] in let indent_string n = let s = ref "" in - for i = 1 to n do s := " " ^ !s done; + for _ = 1 to n do s := " " ^ !s done; !s in let num = ref 0 in let loc_to_string lt = diff --git a/infer/src/backend/logging.ml b/infer/src/backend/logging.ml index b3c6d3a04..af1a2eea8 100644 --- a/infer/src/backend/logging.ml +++ b/infer/src/backend/logging.ml @@ -163,7 +163,7 @@ let d_ln () = add_print_action (PTstrln, Obj.repr "") (** dump an indentation *) let d_indent indent = let s = ref "" in - for i = 1 to indent do s := " " ^ !s done; + for _ = 1 to indent do s := " " ^ !s done; if indent <> 0 then add_print_action (PTstr, Obj.repr !s) (** dump command to increase the indentation level *) diff --git a/infer/src/backend/printer.ml b/infer/src/backend/printer.ml index b1d6e2c7d..73b37b98b 100644 --- a/infer/src/backend/printer.ml +++ b/infer/src/backend/printer.ml @@ -106,7 +106,7 @@ let force_delayed_print fmt = Sil.pp_atom pe_default fmt a | (L.PTdecrease_indent, n) -> let (n: int) = Obj.obj n in - for i = 1 to n do F.fprintf fmt "@]" done + for _ = 1 to n do F.fprintf fmt "@]" done | (L.PTexp, e) -> let (e: Sil.exp) = Obj.obj e in Sil.pp_exp pe_default fmt e @@ -119,7 +119,7 @@ let force_delayed_print fmt = | (L.PTincrease_indent, n) -> let (n: int) = Obj.obj n in let s = ref "" in - for i = 1 to n do s := " " ^ !s done; + for _ = 1 to n do s := " " ^ !s done; F.fprintf fmt "%s@[" !s | (L.PTinstr, i) -> let (i: Sil.instr) = Obj.obj i in diff --git a/infer/src/backend/symExec.ml b/infer/src/backend/symExec.ml index f17e4da17..3cf073c35 100644 --- a/infer/src/backend/symExec.ml +++ b/infer/src/backend/symExec.ml @@ -2403,7 +2403,7 @@ module ModelBuiltins = struct match args with | _ when IList.length args >= skip_n_arguments -> let varargs = ref args in - for i = 1 to skip_n_arguments do varargs := IList.tl !varargs done; + for _ = 1 to skip_n_arguments do varargs := IList.tl !varargs done; call_unknown_or_scan true cfg pdesc tenv prop path ret_ids None !varargs callee_pname loc | _ -> raise (Exceptions.Wrong_argument_number __POS__) diff --git a/infer/src/clang/_tags b/infer/src/clang/_tags deleted file mode 100644 index afa6e9900..000000000 --- a/infer/src/clang/_tags +++ /dev/null @@ -1 +0,0 @@ -: warn(-39)