qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qga/commands-posix.c: Use correct types with g_base64_decode()
@ 2015-04-08 20:02 Peter Maydell
  2015-04-08 20:14 ` Michael Roth
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Peter Maydell @ 2015-04-08 20:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Roth, patches

The second argument of g_base64_decode() is a 'gsize *', not a
'size_t *'. Some compilation environments (like building 32-bit PPC
binaries on a PPC64 system) will complain about the mismatch:

  CC    qga/commands-posix.o
qga/commands-posix.c: In function 'qmp_guest_set_user_password':
qga/commands-posix.c:1908:5: error: passing argument 2 of 'g_base64_decode' from incompatible pointer type [-Werror]
In file included from /usr/include/glib-2.0/glib.h:37:0,
                 from qga/commands-posix.c:14:
/usr/include/glib-2.0/glib/gbase64.h:49:9: note: expected ‘gsize *’ but argument is of type ‘size_t *’

(We previously fixed errors of this type in commit 3d1bba20.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 qga/commands-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index ba8de62..9fde348 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -1901,7 +1901,7 @@ void qmp_guest_set_user_password(const char *username,
     int status;
     int datafd[2] = { -1, -1 };
     char *rawpasswddata = NULL;
-    size_t rawpasswdlen;
+    gsize rawpasswdlen;
     char *chpasswddata = NULL;
     size_t chpasswdlen;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-04-14 15:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 20:02 [Qemu-devel] [PATCH] qga/commands-posix.c: Use correct types with g_base64_decode() Peter Maydell
2015-04-08 20:14 ` Michael Roth
2015-04-14 13:38 ` Thomas Huth
2015-04-14 13:41   ` Peter Maydell
2015-04-14 14:30     ` Paolo Bonzini
2015-04-14 13:42 ` Paolo Bonzini
2015-04-14 13:45   ` Peter Maydell
2015-04-14 14:29     ` Paolo Bonzini
2015-04-14 14:35       ` Eric Blake
2015-04-14 14:50         ` Paolo Bonzini
2015-04-14 15:12           ` Eric Blake
2015-04-14 14:36       ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).