From owner-svn-src-all@freebsd.org Mon Aug 1 04:33:30 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 AB272BAADBE for ; Mon, 1 Aug 2016 04:33:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 742301546 for ; Mon, 1 Aug 2016 04:33:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id b62so176542254iod.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=jiIG927VmFp/gsZui5sg/+huoLCasjhf3t8rE6iYFxuXyJaiLkszbkjp5Y+htOjEc1 0SzPP3L5Au4vgGM9HlpSu6eaprXYbmtebWme9eqFLfh/QJJf8EJ5GdKDpo4nbMSd5MzL GUAQvQxf40E4+4AmYlT37TWRE1eKJbnreYKVlChCVZjgBDXsDgXl0i1LPJUXVirJoLUq R/rHzEb1Mn7oTxdrU9Bo6nyXFrMS3moikf5G9jPDpp9Mq2kib0hs9Saxcr3+rJKQtQqA Mm/t7E1Q46/0mKe+XVmYyqqogqwsjEF+vPyc+gNGglDfoDRJ7trS8xSbjnNTtRwvrQkh Lo9A== X-Gm-Message-State: AEkoout/FHzckfb8ORAESVhIBKqAdnvtVlTA4nmc2F6HY39TKSkATFKvW1B5zgBLrfg+CfO2Ea1aHF3Stsal4g== 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-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 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