pr "CAMLprim value ";
pr "ocaml_guestfs_%s_byte (value *argv, int argn);\n" name;
pr "CAMLprim value\n";
- pr "ocaml_guestfs_%s_byte (value *argv, int argn)\n" name;
+ pr "ocaml_guestfs_%s_byte (value *argv, int argn ATTRIBUTE_UNUSED)\n"
+ name;
pr "{\n";
pr " return ocaml_guestfs_%s (argv[0]" name;
iteri (fun i _ -> pr ", argv[%d]" i) (List.tl params);
}
static void
-progress_callback (guestfs_h *g, void *root,
+progress_callback (guestfs_h *g ATTRIBUTE_UNUSED, void *root,
int proc_nr, int serial, uint64_t position, uint64_t total)
{
CAMLparam0 ();
extern char **ocaml_guestfs_strings_val (guestfs_h *g, value sv);
extern void ocaml_guestfs_free_strings (char **r);
+# ifdef __GNUC__
+# ifndef ATTRIBUTE_UNUSED
+# define ATTRIBUTE_UNUSED __attribute__((__unused__))
+# endif
+#else
+# ifndef ATTRIBUTE_UNUSED
+# define ATTRIBUTE_UNUSED
+# endif
+#endif
+
#endif /* GUESTFS_OCAML_C_H */