From owner-cvs-all Sun Apr 28 3:29: 5 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id E72C537B404; Sun, 28 Apr 2002 03:28:56 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA26053; Sun, 28 Apr 2002 20:28:50 +1000 Date: Sun, 28 Apr 2002 20:30:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Marcel Moolenaar Cc: cvs-committers@FreeBSD.org, Subject: Re: cvs commit: src/sys/kern subr_witness.c In-Reply-To: <20020427191135.GB315@dhcp01.pn.xcllnt.net> Message-ID: <20020428202229.U3552-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 27 Apr 2002, Marcel Moolenaar wrote: > On Sun, Apr 28, 2002 at 04:34:03AM +1000, Bruce Evans wrote: > > the syntax error. The syntax error is just that labels must be followed > > by a statement (there is no such thing as a label by itself; the syntax > > only defines labeled statements). "} after "skip:" is not a statement. > > The closest to a null statement is ";" or "{}". > > Since I did insert a semi-colon, I guess what you are arguing is > that the commit log is a bit silly. I think it's not silly enough > that it's wrong, so I don't see a need for forced commit. Do you? > > Anyway: point taken. The construct was invalid and I didn't realize > it. All I saw was a warning and the change I made was to fix the > warning (exterior manifestation) and not the error (fundamental bug). > Given this, a better fix would be to rewrite the nested FOREACH so > that we don't need to have the label. This is not something I feel > I should be doing though. The code is a bit wrong too. This patch fixes 1 misleading comment and 2 style bugs: Index: subr_witness.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_witness.c,v retrieving revision 1.112 diff -u -2 -r1.112 subr_witness.c --- subr_witness.c 27 Apr 2002 04:48:36 -0000 1.112 +++ subr_witness.c 28 Apr 2002 07:50:17 -0000 @@ -1120,6 +1125,5 @@ } witness_leveldescendents(w, 0); - skip: - ; /* silence GCC 3.x */ +skip: ; } } but committing style fixes of this size is a bit silly; I have 6 more like it in subr_witness.c despite trying not to touch this file. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message