From owner-svn-src-head@freebsd.org Mon Aug 1 04:33:30 2016 Return-Path: Delivered-To: svn-src-head@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 A721FBAADBD for ; Mon, 1 Aug 2016 04:33:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F7D01542 for ; Mon, 1 Aug 2016 04:33:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x232.google.com with SMTP id b62so176542255iod.3 for ; Sun, 31 Jul 2016 21:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=RtJWTP0ntyXggQAt3q/ApA2Yl+qFZQ4rMrMtRpvj40I=; b=eV0Zn31ZGPSsReb5jmVggzJ23Xb7ypHU4901P+xKoWZNNiC9riYm2qnT+n3SXdeeaC 4TSjJfdDVAWSKNwV5K4JtsMxGSLyQFkBHn1hpQQyfL1qXTCQgxXuyNO5n29wFos1mW4s EZARj6+VqSPxxo9K5mdRlkwkAQ+wcgPRYj5/0hR0CCAPNOSkmsHCcrSMz6P4Sr5mLrrm ixpVm561IiHq+qNzrqzXC3/Wsgyo9iebsyBgwipZ9TNkjhiySDwodnCmwyvRewKwE7B5 0LrG0Y/xVyhMMCg9qi7JEkQj45zbRNySetxyTxgDyHFS1NhkWtAaYXkmZ8utirNIfwJT mixg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=RtJWTP0ntyXggQAt3q/ApA2Yl+qFZQ4rMrMtRpvj40I=; b=lbqAyMq/fO2fVxrc+6VJPSDqsxiLUWzEt1oycl3x+i3yFRvBcTQ681YeLPL+9U3aK9 p5jUxW7BhGfg8pIwdZUJuX9GxVkY5jITji5G3A9PrS532nCaYwF/2FQPM9wceCi0IjnA IbenKxrqiBF9OaVfLiKslbn/NsIl1sEZ6QrXyc0+J0oxmF1diSEFlRrHatvzwlH74PrK veYF5Oxb+BiXlT6546yP1Lk+fBCbSzMfNh0CEKurex+aCG0iOGN0W7L3pDoDO8zMQbfQ QxvxICxZO23SF0W3ZBNqqUc/AH/i9AaBl6RbQeNmtoVG2FSAhWIJ6ntKM0cOa+jw269U bylA== X-Gm-Message-State: AEkoouvp6iLJ2wsY7MeRSETCr+aQd7TpTpsXhdU+KEf6vHAHTfN6il67ee3X/DpvLW+75JEnfsx1LdweptsYTQ== X-Received: by 10.107.40.133 with SMTP id o127mr52230095ioo.183.1470026009783; Sun, 31 Jul 2016 21:33:29 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.137.131 with HTTP; Sun, 31 Jul 2016 21:33:29 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <20160731201614.GA58505@stack.nl> References: <201607311311.u6VDBYr8066638@repo.freebsd.org> <20160731134316.GB85936@FreeBSD.org> <20160731201614.GA58505@stack.nl> From: Warner Losh Date: Sun, 31 Jul 2016 22:33:29 -0600 X-Google-Sender-Auth: -pDZ689a-uY8HEGwSU34ss_887E Message-ID: Subject: Re: svn commit: r303586 - head/bin/sh To: Jilles Tjoelker Cc: Alexey Dokuchaev , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 04:33:30 -0000 On Sun, Jul 31, 2016 at 2:16 PM, Jilles Tjoelker wrote: > On Sun, Jul 31, 2016 at 01:43:16PM +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 (r303585) >> > +++ head/bin/sh/expand.c Sun Jul 31 13:11:34 2016 (r303586) >> > @@ -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. > > Both continue; and ; (the latter with and without comment) occur in the > source tree many times. I don't really like a continue that does nothing > because it is at the end of a loop, so I prefer to make this whitespace > change only (there are two more instances in bin/sh). I think a sole > semicolon on a line is conspicuous enough that nothing additional is > required. For humans, yes. For picky tools that warn about strange constructs, no. Clang may be happy, but there's many other tools that expect you to declare an 'empty' while loop with continue. This tradition has dated back to at least the late 80's... Warner