From owner-cvs-src@FreeBSD.ORG Mon Sep 29 10:12:24 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F28F1065692; Mon, 29 Sep 2008 10:12:24 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:3fb::211]) by mx1.freebsd.org (Postfix) with ESMTP id 61E228FC22; Mon, 29 Sep 2008 10:12:23 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C7EC71CC22; Mon, 29 Sep 2008 12:12:21 +0200 (CEST) Date: Mon, 29 Sep 2008 12:12:21 +0200 From: Ed Schouten To: Christoph Mallon Message-ID: <20080929101221.GC16837@hoeg.nl> References: <200809270009.m8R09OTF000738@repoman.freebsd.org> <20080927084606.GZ47828@deviant.kiev.zoral.com.ua> <48DFE13E.2030200@delphij.net> <20080928203210.GA2433@deviant.kiev.zoral.com.ua> <48DFF1AE.6060408@gmx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="69pVuxX8awAiJ7fD" Content-Disposition: inline In-Reply-To: <48DFF1AE.6060408@gmx.de> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: src-committers@freebsd.org, d@delphij.net, cvs-src@freebsd.org, cvs-all@freebsd.org, Xin LI , Kostik Belousov Subject: Re: cvs commit: src/sbin/init init.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2008 10:12:24 -0000 --69pVuxX8awAiJ7fD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Christoph Mallon wrote: > If a function or variable can be made static, it should be. There is > basically not excuse not to do so. In fact, it is considered a design > flaw of C, that symbols default to external linkage instead of internal > by default. If I remember correctly we use -Wmissing-prototypes to somewhat catch this bad programming behaviour. Unfortunately GCC does not support a flag to do a similar thing for variables (where we enforce a variable to be `prototyped' with the `extern' keyword before allowing it to be declared. I noticed we have many variables in the kernel that should be marked static, but aren't. I don't know enough of GCC's internals to add this functionality. --=20 Ed Schouten WWW: http://80386.nl/ --69pVuxX8awAiJ7fD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjgqgUACgkQ52SDGA2eCwXxlwCfQFs1/QMMrZ4ozkvpr7zjueF/ yBkAn1TuDd2zVwRWXyVYLj8e4uMJvcWy =qZ6m -----END PGP SIGNATURE----- --69pVuxX8awAiJ7fD--