From owner-cvs-src@FreeBSD.ORG Mon Sep 1 10:14:03 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 CF838106566C; Mon, 1 Sep 2008 10:14:03 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 8633A8FC19; Mon, 1 Sep 2008 10:14:03 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B4BED2084; Mon, 1 Sep 2008 12:14:02 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 7D07B84497; Mon, 1 Sep 2008 12:14:02 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Giorgos Keramidas References: <200808282031.m7SKVUdD076580@repoman.freebsd.org> <87tzd4n6z8.fsf@kobe.laptop> Date: Mon, 01 Sep 2008 12:14:02 +0200 In-Reply-To: <87tzd4n6z8.fsf@kobe.laptop> (Giorgos Keramidas's message of "Fri, 29 Aug 2008 00:51:39 +0300") Message-ID: <86abes9nrp.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Randall Stewart , src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/netinet sctp_timer.c sctp_timer.h 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, 01 Sep 2008 10:14:03 -0000 Giorgos Keramidas writes: > Randall Stewart writes: > > ok, non static the function and put in the .h so when we do INVARANT > > compile the compiler will not dis the function that is not used. Hmm > > maybe I should have made it ifndef INVARIANTs.. Why did you commit this patch when you already knew of a better (and trivial) alternative? > gcc should be smart enough to throw away the non-static function if > SCTP is built into the kernel (and not as a module) *and* there are no > external references from other parts of the source. Absolutely not - gcc has no way of knowing that the function isn't used by something else (like a loadable module) that is linked into the kernel at a later time. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no