From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfZGO-0008I8-AL for qemu-devel@nongnu.org; Mon, 24 Aug 2009 09:07:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfZGI-0008G7-Jx for qemu-devel@nongnu.org; Mon, 24 Aug 2009 09:07:07 -0400 Received: from [199.232.76.173] (port=55584 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfZGI-0008Fz-F1 for qemu-devel@nongnu.org; Mon, 24 Aug 2009 09:07:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42343) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfZGI-0002n0-1Q for qemu-devel@nongnu.org; Mon, 24 Aug 2009 09:07:02 -0400 From: Juan Quintela In-Reply-To: <4A928DF0.9000106@weilnetz.de> (Stefan Weil's message of "Mon, 24 Aug 2009 14:56:16 +0200") References: <51486eb6860d1680c1bce45e310dcd3aae096f43.1251111439.git.quintela@redhat.com> <4A928DF0.9000106@weilnetz.de> Date: Mon, 24 Aug 2009 15:04:40 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 02/22] eepro100: cast a void * makes no sense List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org Stefan Weil wrote: > Juan Quintela schrieb: >> >> static void nic_reset(void *opaque) >> { >> - EEPRO100State *s = (EEPRO100State *) opaque; >> + EEPRO100State *s = opaque; >> logout("%p\n", s); >> static int first; >> if (!first) { Hi > I wrote these type casts, and I think they make sense. In C, they made no sense. they are a nop. In qemu, they are not used almost anywhere. > In C++ code, they are even mandatory. This is no C++. > I think the arguments why C++ requires this kind of > type casts apply to C code (like in Qemu) as well. And they are? I don't see what they buy us. > If it is possible with no or very litte efforts to write > code which is C and C++ compatible, I prefer to do so. If it is possible to have a consistent code base, with little effort, I prefer to do so. > So please don't apply this patch. I think it should be applied (qemu sense), but you do eepro100 work, and I don't do/plan to do more eepro100 work. I guess it is your call. Later, Juan.