From owner-cvs-src@FreeBSD.ORG Mon Sep 29 15:38:45 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 061EA1065751; Mon, 29 Sep 2008 15:38:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id DEB218FC19; Mon, 29 Sep 2008 15:38:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m8TFcMlg045541; Mon, 29 Sep 2008 11:38:34 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Colin Percival Date: Mon, 29 Sep 2008 10:55:46 -0400 User-Agent: KMail/1.9.7 References: <200809280333.m8S3XABp063809@repoman.freebsd.org> <48DEFFDE.5020300@freebsd.org> In-Reply-To: <48DEFFDE.5020300@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809291055.46386.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 29 Sep 2008 11:38:34 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8353/Mon Sep 29 05:57:09 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Warner Losh , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/cfe cfe_console.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2008 15:38:45 -0000 On Saturday 27 September 2008 11:54:06 pm Colin Percival wrote: > Warner Losh wrote: > > Change while (cond)\n\t\t; to while (cond)\n\t\tcontinue; since the > > former more explicitly tells the compiler that you want an empty loop. > > There are some lint programs that use this hint to avoid generating > > warnings. > > In style(9) the example > for (p = buf; *p != '\0'; ++p) > ; /* nothing */ > is given, but I really like the explicit continue; enough so that I'm > wondering if the example in style(9) should be changed to > for (p = buf; *p != '\0'; ++p) > continue; > to encourage people to write that way (I hope I'm not the only person > who simply never thought of adding the explicit continue?). > > Realizing that questions of style tend to provoke huge debates: Please > send me your opinions off-list, and I'll only make this change if the > emails I get are at least 75% in favour. Assuming lint doesn't have special magic for '/* nothing */' (it does for /* NOTREACHED */ and /* FALLTHROUGH */ IIRC), then I think we should update style(9) for the 'continue;' style that existing tools parse better. -- John Baldwin