Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Oct 1996 19:04:51 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, phk@critter.tfs.com
Cc:        cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, jkh@freefall.freebsd.org, peter@spinner.dialix.com, sos@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/isa syscons.c
Message-ID:  <199610030904.TAA08440@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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.

This would still require changing thosands of functions.

>>The unused attribute doesn't work right in typedefs.  Otherwise we

>But that's because you cannot say
>
>	sy_call_t
>	read 
>	{
>		if (proc != curproc)
>		...
>	}
>
>(Which I think is a bug in C btw.)

That's because the names in prototypes are unused :-).  The attributes
could be used.

>You don't use the typedef when you declare the function.

Yes you do.  The above is a definition, not a declaration :-).

>That's why I have used the SYSCTL_HANDLER_ARGS solution for sysctl.

I don't like macros like these, although I introduced similar ones
for ddb functions.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610030904.TAA08440>