Commits

Oliver Gu committed 67436ec

Turned on all compiler warnings and fixed them all.

Comments (0)

Files changed (6)

   CSources:       libsvm_stubs.c
   CCOpt:          -g -O2 -fPIC -DPIC
   CCLib:          -lsvm
-  BuildDepends:   core,lacaml
+  BuildDepends:   threads,core,lacaml
 
 # Examples
 
-true: debug,annot,thread
-<examples/svm_cli.ml{,i}>: syntax_camlp4o
-
 # OASIS_START
-# DO NOT EDIT (digest: 84680b9f13d00f7e7fb506f73f43a830)
+# DO NOT EDIT (digest: 7a30bae8017fdbf7ebc1d01de6d15d1c)
 # Ignore VCS directories, you can use the same kind of rule outside 
 # OASIS_START/STOP if you want to exclude directories that contains 
 # useless stuff for the build process
 "lib/libsvm_stubs.a": oasis_library_svm_cclib
 "lib/dllsvm_stubs.so": oasis_library_svm_cclib
 <lib/svm.{cma,cmxa}>: use_libsvm_stubs
+<lib/*.ml{,i}>: pkg_threads
 <lib/*.ml{,i}>: pkg_core
 <lib/*.ml{,i}>: pkg_lacaml
+"lib/libsvm_stubs.c": pkg_threads
 "lib/libsvm_stubs.c": pkg_core
 "lib/libsvm_stubs.c": pkg_lacaml
 # Executable xor
 "examples/xor.native": use_svm
+"examples/xor.native": pkg_threads
 "examples/xor.native": pkg_core
 "examples/xor.native": pkg_lacaml
 # Executable svm_cli
 "examples/svm_cli.native": use_svm
 "examples/svm_cli.native": pkg_sexplib
 "examples/svm_cli.native": pkg_sexplib.syntax
+"examples/svm_cli.native": pkg_threads
 "examples/svm_cli.native": pkg_core
 "examples/svm_cli.native": pkg_lacaml
 <examples/*.ml{,i}>: pkg_sexplib
 "examples/log.native": use_svm
 "examples/log.native": pkg_gsl
 "examples/log.native": pkg_archimedes
+"examples/log.native": pkg_threads
 "examples/log.native": pkg_core
 "examples/log.native": pkg_lacaml
 <examples/*.ml{,i}>: use_svm
 <examples/*.ml{,i}>: pkg_gsl
 <examples/*.ml{,i}>: pkg_archimedes
+<examples/*.ml{,i}>: pkg_threads
 <examples/*.ml{,i}>: pkg_core
 <examples/*.ml{,i}>: pkg_lacaml
 # Executable svm_test
 "test/svm_test.native": use_svm
+"test/svm_test.native": pkg_threads
 "test/svm_test.native": pkg_core
 "test/svm_test.native": pkg_lacaml
 <test/*.ml{,i}>: use_svm
+<test/*.ml{,i}>: pkg_threads
 <test/*.ml{,i}>: pkg_core
 <test/*.ml{,i}>: pkg_lacaml
 # OASIS_STOP
+<examples/svm_cli.ml{,i}>: syntax_camlp4o
+<**/*.ml{,i}>: annot, warn_A, warn_e, warn_r
-open Core.Std
 open Lacaml.D
 open Libsvm
 
 # OASIS_START
-# DO NOT EDIT (digest: f7306597525e6b4b2e4656b10873e706)
+# DO NOT EDIT (digest: e08613d46b4fa3a560ae179d230b43f4)
 version = "0.8.3"
 description = "libsvm-ocaml - OCaml bindings to the LIBSVM library"
-requires = "core lacaml"
+requires = "threads core lacaml"
 archive(byte) = "svm.cma"
 archive(byte, plugin) = "svm.cma"
 archive(native) = "svm.cmxa"
 
   module Stub = struct
     type double_array
-    type svm_node
     type svm_node_array
     type svm_node_matrix
 
       int -> double_array = "double_array_create_stub"
     external double_array_set :
       double_array -> int -> float -> unit = "double_array_set_stub"
-    external double_array_get :
-      double_array -> int -> float = "double_array_get_stub"
     external svm_node_array_create :
       int -> svm_node_array = "svm_node_array_create_stub"
     external svm_node_array_set :
       unit -> problem = "svm_problem_create_stub"
     external svm_problem_l_set :
       problem -> int -> unit = "svm_problem_l_set_stub"
-    external svm_problem_l_get :
-      problem -> int = "svm_problem_l_get_stub"
     external svm_problem_y_set :
       problem -> double_array -> unit = "svm_problem_y_set_stub"
     external svm_problem_y_get :
     let dec_vals = Stub.svm_predict_values model nodes in
     match Stub.svm_get_svm_type model with
     | EPSILON_SVR | NU_SVR | ONE_CLASS ->
-      Array.make_matrix 1 1 dec_vals.(0)
+      Array.make_matrix ~dimx:1 ~dimy:1 dec_vals.(0)
     | C_SVC | NU_SVC ->
       let n_classes = Stub.svm_get_nr_class model in
-      let dec_mat = Array.make_matrix n_classes n_classes 0. in
+      let dec_mat = Array.make_matrix ~dimx:n_classes ~dimy:n_classes 0. in
       let count = ref 0 in
       for i = 0 to n_classes-1 do
         for j = i+1 to n_classes-1 do
 (* setup.ml generated for the first time by OASIS v0.2.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: d105e62e22b2819187c4dd60a7e3d61e) *)
+(* DO NOT EDIT (digest: 9e73b285756456f743f225ebcb5c3690) *)
 (*
    Regenerated by OASIS v0.3.0
    Visit http://oasis.forge.ocamlcore.org for more information and
                       bs_compiled_object = Best;
                       bs_build_depends =
                         [
+                           FindlibPackage ("threads", None);
                            FindlibPackage ("core", None);
                            FindlibPackage ("lacaml", None)
                         ];
           };
      oasis_fn = Some "_oasis";
      oasis_version = "0.3.0";
-     oasis_digest = Some "\145E\240\n\131v3E2\159\210\168;\229\141\237";
+     oasis_digest = Some "\135\180%\221\004Ntf\127\151_@3\159\213&";
      oasis_exec = None;
      oasis_setup_args = [];
      setup_update = false;
 
 let setup () = BaseSetup.setup setup_t;;
 
-# 6035 "setup.ml"
+# 6036 "setup.ml"
 (* OASIS_STOP *)
 let () = setup ();;