[Pkg-libvirt-commits] [libguestfs] 212/233: gobject: Remove some more warnings from session.c code.
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:12:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 72713825c44b0aa2587a96cf9e1bf089e3227660
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Feb 13 17:39:58 2014 +0000
gobject: Remove some more warnings from session.c code.
---
generator/gobject.ml | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/generator/gobject.ml b/generator/gobject.ml
index 4a06e08..8080cbf 100644
--- a/generator/gobject.ml
+++ b/generator/gobject.ml
@@ -798,7 +798,7 @@ event_callback (guestfs_h *g, void *opaque,
params->flags = flags;
params->buf = g_byte_array_sized_new (buf_len);
- g_byte_array_append (params->buf, buf, buf_len);
+ g_byte_array_append (params->buf, (const guint8 *) buf, buf_len);
for (size_t i = 0; i < array_len && i < 4; i++) {
if (array_len > 4) {
@@ -1195,7 +1195,7 @@ guestfs_session_close (GuestfsSession *session, GError **err)
pr ", ";
match argt with
| BufferIn n ->
- pr "%s, %s_size" n n
+ pr "(const char *) %s, %s_size" n n
| Bool n | Int n | Int64 n | String n | Device n | Mountable n
| Pathname n | Dev_or_Path n | Mountable_or_Path n
| OptString n | StringList n
@@ -1243,7 +1243,7 @@ guestfs_session_close (GuestfsSession *session, GError **err)
pr "%sif (%s%s) {\n" indent src n;
pr "%s %s%s = g_byte_array_sized_new (%s%s_len);\n"
indent dst n src n;
- pr "%s g_byte_array_append (%s%s, %s%s, %s%s_len);\n"
+ pr "%s g_byte_array_append (%s%s, (const guint8 *) %s%s, %s%s_len);\n"
indent dst n src n src n;
pr "%s}\n" indent
) (cols_of_struct typ)
@@ -1254,10 +1254,12 @@ guestfs_session_close (GuestfsSession *session, GError **err)
| RInt _ | RInt64 _ | RBool _
| RConstString _ | RConstOptString _
- | RString _ | RStringList _
- | RBufferOut _ ->
+ | RString _ | RStringList _ ->
pr " return ret;\n"
+ | RBufferOut _ ->
+ pr " return (guint8 *) ret;\n"
+
| RHashtable _ ->
pr " GHashTable *h = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);\n";
pr " char **i = ret;\n";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list