git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
generator.ml: avoid warnings in generated tests.c
[libguestfs.git]
/
src
/
generator.ml
diff --git
a/src/generator.ml
b/src/generator.ml
index
ad4c0cb
..
189b1fd
100755
(executable)
--- a/
src/generator.ml
+++ b/
src/generator.ml
@@
-5274,7
+5274,7
@@
static void print_error (guestfs_h *g, void *data, const char *msg)
}
/* FIXME: nearly identical code appears in fish.c */
}
/* FIXME: nearly identical code appears in fish.c */
-static void print_strings (char
const
*const *argv)
+static void print_strings (char *const *argv)
{
int argc;
{
int argc;
@@
-5869,7
+5869,7
@@
and generate_test_command_call ?(expect_error = false) ?test test_name cmd =
fun i str ->
pr " const char *%s_%d = \"%s\";\n" n i (c_quote str);
) strs;
fun i str ->
pr " const char *%s_%d = \"%s\";\n" n i (c_quote str);
) strs;
- pr " const char *%s[] = {\n" n;
+ pr " const char *
const
%s[] = {\n" n;
iteri (
fun i _ -> pr " %s_%d,\n" n i
) strs;
iteri (
fun i _ -> pr " %s_%d,\n" n i
) strs;
@@
-5912,7
+5912,7
@@
and generate_test_command_call ?(expect_error = false) ?test test_name cmd =
| FileIn _, arg | FileOut _, arg ->
pr ", \"%s\"" (c_quote arg)
| StringList n, _ | DeviceList n, _ ->
| FileIn _, arg | FileOut _, arg ->
pr ", \"%s\"" (c_quote arg)
| StringList n, _ | DeviceList n, _ ->
- pr ", %s" n
+ pr ",
(char **)
%s" n
| Int _, arg ->
let i =
try int_of_string arg
| Int _, arg ->
let i =
try int_of_string arg
@@
-8589,9
+8589,9
@@
Java_com_redhat_et_libguestfs_GuestFS__1close
| RConstOptString _
| RString _ | RBufferOut _ | RStruct _ | RHashtable _ -> false) ||
List.exists (function
| RConstOptString _
| RString _ | RBufferOut _ | RStruct _ | RHashtable _ -> false) ||
List.exists (function
- | StringList _ -> true
- | DeviceList _ -> true
- | _ -> false) (snd style) in
+
| StringList _ -> true
+
| DeviceList _ -> true
+
| _ -> false) (snd style) in
if needs_i then
pr " int i;\n";
if needs_i then
pr " int i;\n";
@@
-9019,7
+9019,7
@@
and generate_bindtests () =
#define safe_malloc guestfs_safe_malloc
static void
#define safe_malloc guestfs_safe_malloc
static void
-print_strings (char *
const* const
argv)
+print_strings (char *
const *
argv)
{
int argc;
{
int argc;