From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri0K1-0000jt-Qs for qemu-devel@nongnu.org; Tue, 03 Jan 2012 04:06:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ri0Jy-0006dy-2o for qemu-devel@nongnu.org; Tue, 03 Jan 2012 04:06:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri0Jx-0006di-MS for qemu-devel@nongnu.org; Tue, 03 Jan 2012 04:06:13 -0500 Message-ID: <4F02C501.5090000@redhat.com> Date: Tue, 03 Jan 2012 10:06:09 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1325551939-24749-1-git-send-email-aliguori@us.ibm.com> <1325551939-24749-11-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1325551939-24749-11-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 10/30] qdev: don't access name through info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, =?ISO-8859-1?Q?Andreas_F=E4rber?= , Markus Armbruster On 01/03/2012 01:51 AM, Anthony Liguori wrote: > d->nic = qemu_new_nic(&net_e1000_info,&d->conf, > - qdev_get_info(&d->dev.qdev)->name, d->dev.qdev.id, d); > + object_get_typename(OBJECT(d)), d->dev.qdev.id, d); It's a pity that this loses type-safety. Perhaps we should look at adding a warning for "unsafe" pointer casts to GCC. Paolo