Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Feb 2003 23:15:31 +0000
From:      Mark Murray <mark@grondar.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        current@freebsd.org
Subject:   Re: Style fixups for proc.h 
Message-ID:  <200302012315.h11NFVaX028348@grimreaper.grondar.org>
In-Reply-To: Your message of "Sat, 01 Feb 2003 15:04:32 PST." <Pine.BSF.4.21.0302011502090.55342-100000@InterJet.elischer.org> 

next in thread | previous in thread | raw e-mail | index | archive | help

Julian Elischer writes:
> I don't know about the protection with a '_'.
> 
> It's not standard and usually the name matches that used in the actual
> function.

When the prototype parameter name matches a local variable, the C compiler
(and lint) whine about clashes between names in local/global namespace.

2 ways to fix this are to "protect" the prototype argument names with the
"_", or to remove the argument name altogether.

proc.h has no clear guidance, in that recent commits don't stick to
the established style of the file. Some newish prototypes have a
mixture of named/unnamed args in the same function. While I was
making all prototypes' args named, I protected them.

I'd like to fix the warnings, and I'd like the file to be consistent
WRT argument naming.

> It's certainly not part of style(9) that I've ever noticed
> and it's generally noy done that way.. is there a move to do this on all
> the other files?

There is a move to fix lint(1) warnings.

M
--
Mark Murray
iumop ap!sdn w,I idlaH

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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