Date: Tue, 4 Jan 2005 22:10:59 +0100 From: Jens Schweikhardt <schweikh@schweikhardt.net> To: Maxime Henrion <mux@freebsd.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/nologin nologin.c Message-ID: <20050104211059.GB1335@schweikhardt.net> In-Reply-To: <20050104202213.GC63028@elvis.mu.org> References: <200501042007.j04K7Ch1043130@repoman.freebsd.org> <20050104202213.GC63028@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050104211059.GB1335>