From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agE93-0004tQ-O9 for qemu-devel@nongnu.org; Wed, 16 Mar 2016 12:18:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agE90-00074O-EP for qemu-devel@nongnu.org; Wed, 16 Mar 2016 12:18:01 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:33062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agE90-00074I-7O for qemu-devel@nongnu.org; Wed, 16 Mar 2016 12:17:58 -0400 Received: by mail-wm0-x231.google.com with SMTP id l68so197627536wml.0 for ; Wed, 16 Mar 2016 09:17:57 -0700 (PDT) Sender: Paolo Bonzini References: <1458137462-30587-1-git-send-email-peter.maydell@linaro.org> <56E96A3C.4020707@suse.de> From: Paolo Bonzini Message-ID: <56E98732.3040203@redhat.com> Date: Wed, 16 Mar 2016 17:17:54 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , =?UTF-8?Q?Andreas_F=c3=a4rber?= Cc: Thomas Hanson , QEMU Developers 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