qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL 00/12] QOM devices patch queue 2015-05-20


From: Andreas Färber
Subject: Re: [Qemu-devel] [PULL 00/12] QOM devices patch queue 2015-05-20
Date: Wed, 27 May 2015 20:16:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Am 21.05.2015 um 13:53 schrieb Daniel P. Berrange:
> On Thu, May 21, 2015 at 12:18:30PM +0100, Peter Maydell wrote:
>> On 20 May 2015 at 16:51, Andreas Färber <address@hidden> wrote:
>>> Hello Peter,
>>>
>>> This is my QOM (devices) patch queue. Please pull.
>>>
>>> Regards,
>>> Andreas
>>>
>>> Cc: Peter Maydell <address@hidden>
>>> Cc: Eduardo Habkost <address@hidden>
>>> Cc: Paolo Bonzini <address@hidden>
>>> Cc: Daniel P. Berrange <address@hidden>
>>>
>>> The following changes since commit faa261a7fb254866bdd5b6a25ad94677945f21b4:
>>>
>>>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-cocoa-20150519' 
>>> into staging (2015-05-19 10:25:59 +0100)
>>>
>>> are available in the git repository at:
>>>
>>>   git://github.com/afaerber/qemu-cpu.git tags/qom-devices-for-peter
>>>
>>> for you to fetch changes up to 28b86c32afbc53f9f06a5655da65f9d06fac1a3e:
>>>
>>>   qom: Add object_property_add_const_link() (2015-05-20 17:40:47 +0200)
>>
>> Fails to build on my 32-bit ARM box, I'm afraid:
>>
>> tests/check-qom-proplist.c: In function 'test_dummy_badenum':
>> tests/check-qom-proplist.c:225:6: error: value computed is not used
>> [-Werror=unused-value]
>>
>> My guess is this is a gcc-version-dependent thing rather
>> than particularly 32-bit or ARM related. It's using
>> gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
> 
> Agreed, looks gcc version related not ARM/32-bit.
> 
> I'm thinking the following change applied to the patch
> "qom: add a object_property_add_enum helper method" will probably
> fix it
> 
> diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c
> index 8b764a1..7400b1f 100644
> --- a/tests/check-qom-proplist.c
> +++ b/tests/check-qom-proplist.c
> @@ -222,7 +222,7 @@ static void test_dummy_badenum(void)
>  {
>      Error *err = NULL;
>      Object *parent = object_get_objects_root();
> -    DUMMY_OBJECT(
> +    Object *dobj =
>          object_new_with_props(TYPE_DUMMY,
>                                parent,
>                                "dummy0",
> @@ -230,8 +230,9 @@ static void test_dummy_badenum(void)
>                                "bv", "yes",
>                                "sv", "Hiss hiss hiss",
>                                "av", "yeti",
> -                              NULL));
> +                              NULL);
>  
> +    g_assert(dobj == NULL);
>      g_assert(err != NULL);
>      g_assert_cmpstr(error_get_pretty(err), ==,
>                      "Invalid parameter 'yeti'");

Thanks, I've used this instead:

-    g_assert(err != NULL);
+    g_assert_null(dobj);
+    g_assert_nonnull(err);

More places could be cleaned up that way...

Regards,
Andreas

P.S. Quite obviously with gcc 4.8.3 there were no issues on my side.

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)



reply via email to

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