Date: Sun, 28 Apr 2002 20:30:05 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: cvs-committers@FreeBSD.org, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/kern subr_witness.c Message-ID: <20020428202229.U3552-100000@gamplex.bde.org> In-Reply-To: <20020427191135.GB315@dhcp01.pn.xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020428202229.U3552-100000>