qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Build failure with -werror on i386


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] Build failure with -werror on i386
Date: Wed, 27 Feb 2013 14:18:34 +1000

Hi Jesse,

Thanks for looking into this.

On Wed, Feb 27, 2013 at 9:19 AM, Jesse Larrew
<address@hidden> wrote:
> Hi David!
>
> On 02/21/2013 05:19 PM, David Holsgrove wrote:
>> Configuring QEMU as
>>
>> ./configure --target-list=i386-softmmu --cpu=i386 --enable-werror
>>
>> results in following error
>>
>> cc1: warnings being treated as errors
>> qemu-char.c: In function 'qmp_ringbuf_write':
>> qemu-char.c:2764: error: passing argument 2 of 'g_base64_decode' from 
>> incompatible pointer type
>> /usr/include/glib-2.0/glib/gbase64.h:49: note: expected 'gsize *' but 
>> argument is of type 'size_t *'
>>
>> A git-blame (not a bisect) seems to indicate this was introduced with the 
>> following commit.
>>
>> commit 1f590cf9455c571799d1bfc0777255fa0796d4da
>> Author: Lei Li <address@hidden>
>> Date:   Fri Jan 25 00:03:20 2013 +0800
>>
>>     QAPI: Introduce memchar-write QMP command
>>
>>     Signed-off-by: Lei Li <address@hidden>
>>     Signed-off-by: Luiz Capitulino <address@hidden>
>
> Looking at the commit, Lei Li's patch does correctly cast the size_t* to
> gsize* in qmp_ringbuf_write(). It also builds correctly on my system
> (Fedora 17 on x86_64) using -Werror.
>

Looking at the patch David flagged it looks ok to me as well. That
&write_count param is a gsize*. However in the current head it is now
size_t. Heres the patch that changed it:

commit c4f331b6b3b5fe260128f316ee9f01997f7c428d
Author: Markus Armbruster <address@hidden>
Date:   Wed Feb 6 21:27:17 2013 +0100

    qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read()

    Const-correctness, consistently use standard C types instead of mixing
    them with GLib types.

    Signed-off-by: Markus Armbruster <address@hidden>
    Reviewed-by: Eric Blake <address@hidden>
    Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/qemu-char.c b/qemu-char.c
index 2bdd1bb..b1c6132 100644
--- a/qemu-char.c
+++ b/qemu-char.c
[snip]
-    gsize write_count;
+    size_t write_count;

My guess is this patch has caused a regression for Davids cross
compile build flow.

Regards,
Peter

> Are you using a separate build directory for qemu, or are you building
> in-tree? In-tree builds can be flaky sometimes, because 'make distclean'
> can leave some stale bits lying around...
>
> Maybe this is the issue?
>
>>
>> This was produced on an Ubuntu 10.04 x86_64 machine.
>>
>> regards,
>> David
>>
>
> Sincerely,
>
> Jesse Larrew
> Software Engineer, KVM Team
> IBM Linux Technology Center
> Phone: (512) 973-2052 (T/L: 363-2052)
> address@hidden
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]