From owner-cvs-src@FreeBSD.ORG Wed Jan 5 15:34:34 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8788716A4CE; Wed, 5 Jan 2005 15:34:34 +0000 (GMT) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 439F843D31; Wed, 5 Jan 2005 15:34:34 +0000 (GMT) (envelope-from nectar@FreeBSD.org) Received: from lum.celabo.org (lum.celabo.org [10.0.1.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lum.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id 825C73E2D0A; Wed, 5 Jan 2005 09:34:33 -0600 (CST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by lum.celabo.org (Postfix) with ESMTP id 3990854F209; Wed, 5 Jan 2005 09:34:30 -0600 (CST) In-Reply-To: <20050104202213.GC63028@elvis.mu.org> References: <200501042007.j04K7Ch1043130@repoman.freebsd.org> <20050104202213.GC63028@elvis.mu.org> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <4A4547FB-5F2F-11D9-96EE-000A95BC6FAE@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Jacques Vidrine Date: Wed, 5 Jan 2005 09:34:29 -0600 To: Maxime Henrion X-Mailer: Apple Mail (2.619) cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Xin LI cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/nologin nologin.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 05 Jan 2005 15:34:34 -0000 On Jan 4, 2005, at 2:22 PM, Maxime Henrion wrote: > Xin LI wrote: >> delphij 2005-01-04 20:07:12 UTC >> >> FreeBSD src repository >> >> Modified files: >> usr.sbin/nologin nologin.c >> Log: >> Use __unused macro instead of a bare void for main(). >> >> Suggested by: nectar > > I bet there is a reason behind this, but I'm totally puzzled at why you > would do such a thing. It was much prettier and more "C" before. > Could > you shed some light on this please? The point was to kill the spurious warnings. Marking arguments as "unused" accomplishes this, and indicates more clearly to readers of the code the intentions of the writer. Though "int main(void)" is acceptable Standard C, the canonical form is preferable, IMHO. (I emailed my suggestion privately for a reason. This could too easily become a pointless style flamethread, so forgive me for not responding to any further messages on this point.) Cheers, -- Jacques A Vidrine / NTT/Verio nectar@celabo.org / jvidrine@verio.net / nectar@freebsd.org