From owner-cvs-all@FreeBSD.ORG Tue Jan 4 21:11:13 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 241EA16A4CE; Tue, 4 Jan 2005 21:11:13 +0000 (GMT) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4A8843D62; Tue, 4 Jan 2005 21:11:11 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id 0E2193B8D3; Tue, 4 Jan 2005 22:11:09 +0100 (CET) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) j04LAx6W005556; Tue, 4 Jan 2005 22:10:59 +0100 (CET) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.13.1/8.13.1/Submit) id j04LAxnv005555; Tue, 4 Jan 2005 22:10:59 +0100 (CET) (envelope-from schweikh) Date: Tue, 4 Jan 2005 22:10:59 +0100 From: Jens Schweikhardt To: Maxime Henrion Message-ID: <20050104211059.GB1335@schweikhardt.net> References: <200501042007.j04K7Ch1043130@repoman.freebsd.org> <20050104202213.GC63028@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050104202213.GC63028@elvis.mu.org> User-Agent: Mutt/1.5.6i 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 21:11:13 -0000 On Tue, Jan 04, 2005 at 09:22:13PM +0100, 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. void main is not C by any stretch of imagination (as any thread with "void main" in the subject in comp.lang.c and the clc FAQ will teach you :-) gcc can be made to warn if main returns anything other than int or equivalent. The difference for main compared to any other function is that you do not control its caller (eg crt1.o), so you better define it as the caller expects it--returning int. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)