From owner-cvs-all@FreeBSD.ORG Thu Jan 6 10:44:01 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 CF3E816A4CE; Thu, 6 Jan 2005 10:44:01 +0000 (GMT) Received: from jc.ngo.org.uk (jc.ngo.org.uk [69.55.225.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8588643D31; Thu, 6 Jan 2005 10:44:01 +0000 (GMT) (envelope-from nik@crf-consulting.co.uk) Received: from crf-consulting.co.uk (82-44-220-218.cable.ubr10.haye.blueyonder.co.uk [82.44.220.218]) by jc.ngo.org.uk (8.12.11/8.13.1) with ESMTP id j06Ai4vQ088110; Thu, 6 Jan 2005 02:44:05 -0800 (PST) (envelope-from nik@crf-consulting.co.uk) Received: from clan.nothing-going-on.org (clan.nothing-going-on.org [192.168.1.20]) by crf-consulting.co.uk (8.13.1/8.12.9) with ESMTP id j06AhxDo048311; Thu, 6 Jan 2005 10:43:59 GMT (envelope-from nik@catkin) Received: from clan.nothing-going-on.org (localhost [127.0.0.1]) j06AhuPt052358; Thu, 6 Jan 2005 10:43:56 GMT (envelope-from nik@clan.nothing-going-on.org) Received: (from nik@localhost) by clan.nothing-going-on.org (8.13.1/8.13.1/Submit) id j06Ahu3m052357; Thu, 6 Jan 2005 10:43:56 GMT (envelope-from nik) Date: Thu, 6 Jan 2005 10:43:56 +0000 From: Nik Clayton To: Robert Watson Message-ID: <20050106104356.GB52159@clan.nothing-going-on.org> References: <20050104202213.GC63028@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O5XBE6gyVG5Rl6Rj" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Organization: FreeBSD Project cc: Maxime Henrion 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: Thu, 06 Jan 2005 10:44:02 -0000 --O5XBE6gyVG5Rl6Rj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 04, 2005 at 11:11:07PM +0000, Robert Watson wrote: > On Tue, 4 Jan 2005, Maxime Henrion wrote: > > 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?=20 >=20 > 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()= =20 > definition if they aren't referenced when running at higher WARNS levels.= =20 > 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? :-)=20 What's wrong with (the perfectly legal): int main(void) { ... } or does gcc complain about that too? N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ (__) FreeBSD Documentation Project http://www.freebsd.org/docproj/ \\\'',) \/ \= ^ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- .\._/= _) --O5XBE6gyVG5Rl6Rj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFB3RZsk6gHZCw343URAvkNAJ9b6taGU6HrsMjQhalXzNWbOUZ3jgCeJ93p terPGmNm6aAvC9CpXPdvLgs= =Vi3g -----END PGP SIGNATURE----- --O5XBE6gyVG5Rl6Rj--