From owner-cvs-all@FreeBSD.ORG Tue Jan 4 23:14:47 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B42B316A4FD; Tue, 4 Jan 2005 23:14:47 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E6A243D39; Tue, 4 Jan 2005 23:14:47 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id j04NB7NU059483; Tue, 4 Jan 2005 18:11:07 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)j04NB7AH059480; Tue, 4 Jan 2005 23:11:07 GMT (envelope-from robert@fledge.watson.org) Date: Tue, 4 Jan 2005 23:11:07 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Maxime Henrion In-Reply-To: <20050104202213.GC63028@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2005 23:14:47 -0000 On Tue, 4 Jan 2005, 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? I ran into exactly the same problem I assume Xin Li is now running into just a few days ago: gcc warns if argc and argv are unused in the main() definition if they aren't referenced when running at higher WARNS levels. I would argue this is a bug in gcc, since main() is part of an API calling convention, and it doesn't matter if the arguments are unused by the function -- they are still provided by the caller. But then, I'm not a C expert, so maybe this opinion is the result of poor breeding? :-) Robert N M Watson