From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi16o-0004UX-0N for qemu-devel@nongnu.org; Tue, 14 Apr 2015 09:42:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yi16k-00017y-Hq for qemu-devel@nongnu.org; Tue, 14 Apr 2015 09:42:33 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:34470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi16k-00017a-9s for qemu-devel@nongnu.org; Tue, 14 Apr 2015 09:42:30 -0400 Received: by widjs5 with SMTP id js5so88742210wid.1 for ; Tue, 14 Apr 2015 06:42:29 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <552D1940.5030709@redhat.com> Date: Tue, 14 Apr 2015 15:42:24 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1428523369-13700-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1428523369-13700-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] qga/commands-posix.c: Use correct types with g_base64_decode() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Michael Roth , patches@linaro.org On 08/04/2015 22:02, Peter Maydell wrote: > 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 I think this patch is wrong. Considering what Thomas was doing ("playing around with --extra-cflags=-m32" on x86) this looks like you're using the 64-bit glib headers while doing a 32-bit compilation. Paolo > --- > 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; > >