qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qdev_try_create(): Assert that devices we put o


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices
Date: Wed, 16 Mar 2016 17:17:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0


On 16/03/2016 15:25, Peter Maydell wrote:
> > Looks strange, but okay,
> You mean the way we use what looks like a cast macro and ignore
> the result? Yeah, I thought that was a little odd-looking. Happy
> to do it some other way if you have an alternative suggestion.

Perhaps this:

g_assert(object_dynamic_cast(OBJECT(dev), TYPE_SYS_BUS_DEVICE) != NULL);

or just add a (void) in front of the cast.

Paolo



reply via email to

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