Path parameter did not work in Augeas.rm and Augeas.count_matches bindings.
[ocaml-augeas.git] / augeas-c.c
index 0b535d6..4818116 100644 (file)
@@ -56,7 +56,7 @@ augeas_t_finalize (value tv)
 }
 
 static struct custom_operations custom_operations = {
-  "augeas_t_custom_operations",
+  (char *) "augeas_t_custom_operations",
   augeas_t_finalize,
   custom_compare_default,
   custom_hash_default,
@@ -81,6 +81,8 @@ static value Val_augeas_t (augeas_t t)
   CAMLreturn (rv);
 }
 
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+
 /* val create : string -> string option -> flag list -> t */
 CAMLprim value
 ocaml_augeas_create (value rootv, value loadpathv, value flagsv)
@@ -199,7 +201,7 @@ ocaml_augeas_rm (value tv, value pathv)
 {
   CAMLparam2 (tv, pathv);
   augeas_t t = Augeas_t_val (tv);
-  char *path = String_val (path);
+  char *path = String_val (pathv);
   int r;
 
   r = aug_rm (t, path);
@@ -246,7 +248,7 @@ ocaml_augeas_count_matches (value tv, value pathv)
 {
   CAMLparam2 (tv, pathv);
   augeas_t t = Augeas_t_val (tv);
-  char *path = String_val (path);
+  char *path = String_val (pathv);
   int r;
 
   r = aug_match (t, path, NULL);