From owner-cvs-sys Thu Oct 3 01:35:12 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA14284 for cvs-sys-outgoing; Thu, 3 Oct 1996 01:35:12 -0700 (PDT) Received: from critter.tfs.com ([140.145.230.177]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id BAA14261; Thu, 3 Oct 1996 01:35:01 -0700 (PDT) Received: from critter.tfs.com (localhost.tfs.com [127.0.0.1]) by critter.tfs.com (8.7.5/8.7.3) with ESMTP id KAA05422; Thu, 3 Oct 1996 10:34:23 +0200 (MET DST) To: Bruce Evans cc: peter@spinner.dialix.com, sos@FreeBSD.org, cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, jkh@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/isa syscons.c In-reply-to: Your message of "Thu, 03 Oct 1996 18:16:22 +1000." <199610030816.SAA06864@godzilla.zeta.org.au> Date: Thu, 03 Oct 1996 10:34:22 +0200 Message-ID: <5420.844331662@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-cvs-sys@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk In message <199610030816.SAA06864@godzilla.zeta.org.au>, Bruce Evans writes: >I don't want to add non-C to thousands of args in scattered functions. I agree. One "semi-clean" way of doing it would have been to add a hack to gcc so that args named __unused_* wasn't complained about, then you could: int foo (char * _unused_1) { } to suppress it. >The unused attribute doesn't work right in typedefs. Otherwise we >could use > >/* Args to switch functions are often unused, so don't warn about them. */ >typedef int sy_call_t __P((struct proc *p __unused, void *uap __unused, > int *retval __unused)); > >The unused attribute is silently ignored here :-(. But that's because you cannot say sy_call_t read { if (proc != curproc) ... } (Which I think is a bug in C btw.) You don't use the typedef when you declare the function. That's why I have used the SYSCTL_HANDLER_ARGS solution for sysctl. We could do the same for syscalls I guess. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so.