From owner-svn-src-all@freebsd.org Mon Aug 1 16:40:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A446BAAA50 for ; Mon, 1 Aug 2016 16:40:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D68A01B1F for ; Mon, 1 Aug 2016 16:40:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: a7fd057a-5806-11e6-a0ff-e511cd071b9b X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 1 Aug 2016 16:40:28 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u71GdOMW034225; Mon, 1 Aug 2016 10:39:24 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1470069564.1283.20.camel@freebsd.org> Subject: Re: svn commit: r303586 - head/bin/sh From: Ian Lepore To: Alexey Dokuchaev , Jilles Tjoelker Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 01 Aug 2016 10:39:24 -0600 In-Reply-To: <20160731134316.GB85936@FreeBSD.org> References: <201607311311.u6VDBYr8066638@repo.freebsd.org> <20160731134316.GB85936@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 16:40:36 -0000 On Sun, 2016-07-31 at 13:43 +0000, Alexey Dokuchaev wrote: > On Sun, Jul 31, 2016 at 01:11:34PM +0000, Jilles Tjoelker wrote: > > New Revision: 303586 > > URL: https://svnweb.freebsd.org/changeset/base/303586 > > > > Log: > > sh: Fix a clang warning. > > > > Submitted by: bdrewery > > > > Modified: > > head/bin/sh/expand.c > > > > Modified: head/bin/sh/expand.c > > =================================================================== > > =========== > > --- head/bin/sh/expand.c Sun Jul 31 12:59:10 2016 (r3 > > 03585) > > +++ head/bin/sh/expand.c Sun Jul 31 13:11:34 2016 (r3 > > 03586) > > @@ -473,7 +473,8 @@ expbackq(union node *cmd, int quoted, in > > if (--in.nleft < 0) { > > if (in.fd < 0) > > break; > > - while ((i = read(in.fd, buf, sizeof buf)) > > < 0 && errno == EINTR); > > + while ((i = read(in.fd, buf, sizeof buf)) > > < 0 && errno == EINTR) > > + ; > > `continue;' would be even better; some tools might barf at stray > semicolon. > > ./danfe > I strongly agree that the right way to do an empty loop is to use "continue;" on a line by itself. Unfortunately, what style(9) suggests by way of example is a single semicolon on a line by itself with a comment of "/* nothing */" to the right on the same line. Ick. -- Ian