Markus Mottl avatar Markus Mottl committed 0ca7315

Added stricter OCaml flags to Core build scripts and fixed a few warnings

Comments (0)

Files changed (8)

base/core/extended/lib/command.ml

     | `Ok tbl -> (fun flag ->
       match partial_match tbl flag with
       | `Exact (_, v)
-      | `Partial (_, ({full_flag_required = false} as v)) -> Some v.spec
-      | `Partial (_, ({full_flag_required = true} as v)) ->
+      | `Partial (_, ({full_flag_required = false; _} as v)) -> Some v.spec
+      | `Partial (_, ({full_flag_required = true; _} as v)) ->
         eprintf "Note: cannot abbreviate flag \"%s\".\n%!" v.name; None
       | `Ambiguous l ->
         eprintf "Note: flag \"%s\" is an ambiguous prefix: %s\n%!"
       | `None -> None)
   ;;
 
-  let help { name = name; doc = doc; aliases = aliases}  =
+  let help { name = name; doc = doc; aliases = aliases; _}  =
     if String.is_prefix doc ~prefix:" " then
       (name, String.lstrip doc) ::
         List.map aliases

base/core/extended/lib/core_command.ml

             (x ^ " " ^ arg, sprintf "same as \"%s\"" name))
   end
 
-  let align {name; doc; aliases; action = _} =
+  let align {name; doc; aliases; _} =
     let (name, doc) =
       match String.lsplit2 doc ~on:' ' with
       | None | Some ("", _) -> (name, String.strip doc)

base/core/extended/lib/documented_match_statement.ml

 
 let match_ t x =
   match List.filter t.specific_cases
-    ~f:(fun { pattern = x' } -> List.exists x' ~f:(fun y -> x = y)) with
+    ~f:(fun { pattern = x'; _ } -> List.exists x' ~f:(fun y -> x = y)) with
   | case1::case2::_ -> failwithf "pattern appears twice in documented_match (%s,%s)"
     case1.documentation case2.documentation ()
   | [case] -> case.value ()

base/core/extended/lib/exception_check.ml

       U.set_nonblock s;
       while true do
         try
-          let { U.Select_fds.read = rd } =
+          let { U.Select_fds.read = rd; _ } =
             U.select ~read:(s :: !clients) ~write:[] ~except:[]
               ~timeout:(- 1.0) ()
           in

base/core/extended/lib/loggers.ml

     let
         {
           tm_year = m_year; tm_mon = m_month; tm_mday = m_mday;
-          tm_hour = m_hour; tm_min = m_min; tm_sec = m_sec;
+          tm_hour = m_hour; tm_min = m_min; tm_sec = m_sec; _
         } = localtime mtime in
     let m_sec = float m_sec +. mod_float mtime 1. in
     sprintf "%04d-%02d-%02d/%02d:%02d:%05.2f"

base/core/extended/lib/sys_utils.ml

 
   let sample_exn pid =
     let module P = Procfs.Process in
-    let {P.Stat.utime; stime} = (Procfs.with_pid_exn pid).P.stat in
+    let {P.Stat.utime; stime; _} = (Procfs.with_pid_exn pid).P.stat in
     { jiffies = Big_int.add_big_int utime stime;
       time = Time.now () }
 
     t.s0 <- t.s1;
     t.s1 <- sample_exn t.pid
 
-  let cpu_use {jps; s0={jiffies=j0;time=t0}; s1={jiffies=j1;time=t1}} =
+  let cpu_use {jps; s0={jiffies=j0;time=t0}; s1={jiffies=j1;time=t1}; _} =
     let my_jps =
       Big_int.float_of_big_int (Big_int.sub_big_int j1 j0)
       /. Time.Span.to_sec (Time.diff t1 t0)

base/core/extended/oasis.sh

             List.concat (List.map f flags)
           in
           flag ["compile"; "c"] (S cflags);
+          flag ["compile"; "ocaml"] (S [A "-w"; A "@Ae" ]);
           dispatch_default e
       | e -> dispatch_default e
   end

base/core/oasis.sh

             List.concat (List.map f flags)
           in
           flag ["compile"; "c"] (S cflags);
+          flag ["compile"; "ocaml"] (S [A "-w"; A "@Ae" ]);
           dispatch_default e
       | e -> dispatch_default e
   end
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.