[MPlayer-dev-eng] [patch] make some functions static

Stefan Huehner stefan at huehner.org
Fri Jul 14 16:38:42 CEST 2006


On Thu, Jul 13, 2006 at 03:39:49PM -0400, Rich Felker wrote:
> On Thu, Jul 13, 2006 at 05:57:08PM +0200, Guillaume POIRIER wrote:
> > Hi,
> > 
> > On 7/11/06, Stefan Huehner <stefan at huehner.org> wrote:
> > >Hi,
> > >
> > >attached patch marks several function without a prototype which arent
> > >used outside its sourcefile as static.
> > >
> > >Regards,
> > >Stefan
> > 
> > BTW, What tool are you using to spot all of these?
> > 
> > Also, did you run some tests to see if GCC was taking advantage of
> > being told if so and so variable is constant or static?
> 
> The idea of static isn't for the compiler to take advantage of it. The
> idea is to prevent polluting the global namespace (which also reduces
> link time by keeping the global symbol table size down).

Ideally the compiler can use it for additional optimization (i.e.
inlining the function), as it has not to be exported anymore.

But main focus is not to exporting it at all as you said.

Regards,
Stefan




More information about the MPlayer-dev-eng mailing list