qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL v2 00/14] QMP and QObject patches


From: Eric Blake
Subject: Re: [Qemu-devel] [PULL v2 00/14] QMP and QObject patches
Date: Wed, 28 Oct 2015 09:24:28 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/28/2015 09:07 AM, Peter Maydell wrote:

>>       glib: add compatibility interface for g_hash_table_add()
>>       monitor: Turn monitor_qapi_event_state[] into a hash table

> 
>   CC    qga/commands-posix.o
> In file included from /Users/pm215/src/qemu-for-merges/qga/main.c:25:
> In file included from
> /Users/pm215/src/qemu-for-merges/include/qapi/qmp/json-parser.h:17:
> In file included from 
> /Users/pm215/src/qemu-for-merges/include/qemu-common.h:25:
> /Users/pm215/src/qemu-for-merges/include/glib-compat.h:171:12: error:
> returning 'void' from a function with incompatible result type
> 'gboolean' (aka 'int')
>     return g_hash_table_replace(hash_table, key, key)
>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Looks like g_hash_table_replace was originally a 'void' return
> and switched to 'gboolean' return at some later date:
> 
> https://github.com/GNOME/glib/commit/910191597a6c2e5d5d460e9ce9efb4f47d9cc63c

This patch series isn't using the return value of g_hash_table_add, so
our glib replacement could be changed to return void.

On the other hand, would it be better to proactively retrofit the return
type into ALL of the g_hash_table_* functions that were swapped to
return a value, so that future uses of the functions with qemu can make
use of the modern contract, even though this series doesn't use it?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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