From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfaAp-0004CX-MK for qemu-devel@nongnu.org; Mon, 24 Aug 2009 10:05:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfaAk-000461-RB for qemu-devel@nongnu.org; Mon, 24 Aug 2009 10:05:26 -0400 Received: from [199.232.76.173] (port=45505 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfaAk-00045m-Ic for qemu-devel@nongnu.org; Mon, 24 Aug 2009 10:05:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4568) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfaAh-00050N-Sb for qemu-devel@nongnu.org; Mon, 24 Aug 2009 10:05:22 -0400 Message-ID: <4A929E16.1080806@redhat.com> Date: Mon, 24 Aug 2009 16:05:10 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense References: <51486eb6860d1680c1bce45e310dcd3aae096f43.1251111439.git.quintela@redhat.com> <4A928DF0.9000106@weilnetz.de> In-Reply-To: <4A928DF0.9000106@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org, Juan Quintela >> static void nic_save(QEMUFile * f, void *opaque) >> { >> - EEPRO100State *s = (EEPRO100State *) opaque; >> + EEPRO100State *s = opaque; > I wrote these type casts, and I think they make sense. Why? There is no technical reason for it. And in that case it IMHO doesn't make sense to keep the cast as documentation. > If it is possible with no or very litte efforts to write > code which is C and C++ compatible, I prefer to do so. Point being? I doubt qemu will go C++ ... cheers, Gerd