From owner-freebsd-audit Mon Jul 15 13:34:23 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11E8937B400; Mon, 15 Jul 2002 13:34:21 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id D524343E65; Mon, 15 Jul 2002 13:34:19 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id g6FKYG1f009163; Mon, 15 Jul 2002 14:34:16 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 15 Jul 2002 14:33:59 -0600 (MDT) Message-Id: <20020715.143359.133959512.imp@bsdimp.com> To: bde@zeta.org.au Cc: des@ofug.org, keramida@FreeBSD.ORG, freebsd-audit@FreeBSD.ORG Subject: Re: bin/ln & WARNS=5 From: "M. Warner Losh" In-Reply-To: <20020716063117.G41957-100000@gamplex.bde.org> References: <20020715.132802.128242391.imp@bsdimp.com> <20020716063117.G41957-100000@gamplex.bde.org> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020716063117.G41957-100000@gamplex.bde.org> Bruce Evans writes: : On Mon, 15 Jul 2002, M. Warner Losh wrote: : : > In message: <20020716051814.Q41695-100000@gamplex.bde.org> : > Bruce Evans writes: : > : That is a bug in 7+ kloc. No so very old code like src/bin/ln (together : > : with most of src/bin and large parts of src/{sbin,usr.bin,usr.sbin} : > : was obviously cleaned up to have a common style in 4.4BSD or earlier. : > : Equally obviously, the cleanup didn't get as far as src/games. : > : > So would you agree with: : > : > Index: style.9 : > =================================================================== : > RCS file: /cache/ncvs/src/share/man/man9/style.9,v : > retrieving revision 1.87 : > diff -u -r1.87 style.9 : > --- style.9 2 Jul 2002 01:39:35 -0000 1.87 : > +++ style.9 15 Jul 2002 18:15:58 -0000 : > @@ -520,6 +520,13 @@ : > Note that : > .Xr indent 1 : > does not understand this rule. : > +.Ic sizeof Ns 's : > +are written like function calls always. : > +The redundant parenthesis rules do not apply to : > +.Ic sizeof(var) : > +instances. : > +Some code in the tree does not follow the last part of this rule. : > +Do not change it gratuitously to do so. : > .Pp : > .Dv NULL : > is the preferred null pointer constant. : > : : OK. One of the many inconsistencies in style.9 was that it says that : casts are "not followed by a space" (so "sizeof foo" is not permitted) : and that parentheses must not be used "unless they are required for : precedence or ..." (so "sizeof foo" is required). That's what I'm trying to clear up here. Whenever we find one and make some kind of determination, I'd like to document it. This is my first cut at so doing. :-) Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message