Date: Thu, 17 May 2001 21:11:21 +0100 From: Brian Somers <brian@Awfulhak.org> To: Peter Wemm <peter@wemm.org> Cc: Ruslan Ermilov <ru@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org Subject: Re: cvs commit: src/sys/sys sysctl.h Message-ID: <200105172011.f4HKBLb68306@hak.lan.Awfulhak.org> In-Reply-To: Message from Peter Wemm <peter@wemm.org> of "Thu, 17 May 2001 12:22:46 PDT." <20010517192246.99AA8380A@overcee.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> Ruslan Ermilov wrote:
> > ru 2001/05/17 10:57:37 PDT
> >
> > Modified files:
> > sys/sys sysctl.h
> > Log:
> > Cosmetics to rev.1.89: removed argument names in a function prototype.
>
> It is also correct to merely move the names out of application
> space. ie, change:
> int foo(int *bar);
> to:
> int foo(int *_bar);
>
> For the bystanders, this is so that if somebody already has a macro:
> #define bar 1
> then a later #include <sys/sysctl.h> will fail due to: int foo(int *1);
> Applications are perfectly entitled to do this.
On a somewhat more esoteric note, when compiling with -Wshadow and
using something like
int foo(int link)
you end up with a warning if you include unistd.h (it confuses
``link'' with the function prototype.
This may be a compiler bug though :)
> Cheers,
> -Peter
> --
> Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
> "All of this is for nothing if we don't go to the stars" - JMS/B5
--
Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org>
<http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105172011.f4HKBLb68306>
