[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PULL v2 05/14] qlist: Make conversion from QObject * accept null, (continued)
- [Qemu-devel] [PULL v2 05/14] qlist: Make conversion from QObject * accept null, Markus Armbruster, 2015/10/28
- [Qemu-devel] [PULL v2 03/14] qdict: Make conversion from QObject * accept null, Markus Armbruster, 2015/10/28
- [Qemu-devel] [PULL v2 09/14] monitor: Switch from timer_new() to timer_new_ns(), Markus Armbruster, 2015/10/28
- [Qemu-devel] [PULL v2 14/14] docs: Document QMP event rate limiting, Markus Armbruster, 2015/10/28
- [Qemu-devel] [PULL v2 10/14] monitor: Split MonitorQAPIEventConf off MonitorQAPIEventState, Markus Armbruster, 2015/10/28
- [Qemu-devel] [PULL v2 07/14] monitor: Reduce casting of QAPI event QDict, Markus Armbruster, 2015/10/28
- [Qemu-devel] [PULL v2 02/14] qbool: Make conversion from QObject * accept null, Markus Armbruster, 2015/10/28
- [Qemu-devel] [PULL v2 11/14] glib: add compatibility interface for g_hash_table_add(), Markus Armbruster, 2015/10/28
- [Qemu-devel] [PULL v2 13/14] monitor: Throttle event VSERPORT_CHANGE separately by "id", Markus Armbruster, 2015/10/28
- Re: [Qemu-devel] [PULL v2 00/14] QMP and QObject patches, Peter Maydell, 2015/10/28
- Re: [Qemu-devel] [PULL v2 00/14] QMP and QObject patches,
Eric Blake <=