cvs commit: src/usr.sbin/nologin nologin.c
Jens Schweikhardt
schweikh at schweikhardt.net
Tue Jan 4 13:11:13 PST 2005
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)
More information about the cvs-src
mailing list