From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSXYM-00082P-51 for qemu-devel@nongnu.org; Mon, 11 Aug 2008 09:35:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSXYJ-0007zf-EK for qemu-devel@nongnu.org; Mon, 11 Aug 2008 09:35:17 -0400 Received: from [199.232.76.173] (port=44576 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSXYI-0007yy-MM for qemu-devel@nongnu.org; Mon, 11 Aug 2008 09:35:14 -0400 Received: from bsdimp.com ([199.45.160.85]:64941 helo=harmony.bsdimp.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KSXYI-0001t2-60 for qemu-devel@nongnu.org; Mon, 11 Aug 2008 09:35:14 -0400 Date: Mon, 11 Aug 2008 07:32:55 -0600 (MDT) Message-Id: <20080811.073255.1649768698.imp@bsdimp.com> Subject: Re: [Qemu-devel] [RFC, PATCH] Add -Wstrict-prototypes, maybe later -Wmissing-prototypes From: "M. Warner Losh" In-Reply-To: <20080811095457.GA4499@implementation.uk.xensource.com> References: <489FEFA3.3040105@redhat.com> <20080811095457.GA4499@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, samuel.thibault@ens-lyon.org In message: <20080811095457.GA4499@implementation.uk.xensource.com> Samuel Thibault writes: : Gerd Hoffmann, le Mon 11 Aug 2008 09:52:03 +0200, a =E9crit : : > > The warning is generated because the definition of "handler" shou= ld : > > also describe the parameters and not use the old () style. But in= this : > > case, they can vary: : > > static void do_help(const char *name) : > > static void do_quit(void) : > [ ... ] : > = : > > I don't have a good plan how to fix this, proposals are welcome. : > > Changing all handlers to use va_args to just silence a gcc warnin= g : > > sounds like overkill. : > = : > Using a union maybe? : = : That should be the right thing yes. Except it becomes unmanageable over time... It also doesn't enhance type safety... Warner