cvs commit: src/sys/netinet sctp_timer.c sctp_timer.h

Dag-Erling Smørgrav des at des.no
Mon Sep 1 10:14:03 UTC 2008


Giorgos Keramidas <keramida at freebsd.org> writes:
> Randall Stewart <rrs at freebsd.org> 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
-- 
Dag-Erling Smørgrav - des at des.no


More information about the cvs-src mailing list