[MPlayer-dev-eng] [PATCH] Warning fixes 2nd try

Diego Biurrun diego at biurrun.de
Sat Jul 28 19:55:13 CEST 2007


On Fri, Jul 20, 2007 at 07:56:29PM +0200, Mizda Gábor wrote:
> 2007.07.20. 16:15 keltezéssel, Uoti Urpala írta:
>>> extern int ass_enabled;
>>> can be found in both mp_core.h and gui/cfg.h, removed from mp_core.h
>>
>> How could gui/cfg.h be enough? It's used outside GUI code.
>>   
> Funny. I knew they don't belong there but take a look, several ass related 
> variables can
> be found in gui/cfg.h which can be found in libass/ass_mp.h and are 
> declared in libass/ass_mp.c.
> I didn't want to mess with them to much but let is be.
>
> Only gui/cfg.c and gui/interface.c are using ass variables without 
> including ass_mp.h, every other
> file, which uses these vars, use libass.
> I made two patches for removing the extern declarations from cfg.h, I don't 
> know which one is preferable.

The second one is preferrable.  I think you can even move the #include
to the top of the file, though.  If it works and does not introduce new
warnings, commit it.

> The vo_gamma_* vars can be removed safely, mplayer.c and command.c both 
> includes libvo/video_out.h.

IMO commit.

> The get_path thing is a harder one. I've build the gui, command.c includes 
> gui/interface.h which
> has get_path as extern. If there's no gui, the patched mp_core.h causes 
> another warning: implicit
> declaration. So I put an else to the #ifdef to have get_path declared in 
> both cases. Thus it doesn't
> trigger warning in mplayer.c and command.c will be fine too.

This is not the right solution.  Move the declaration from gui/interface.h
to mp_core.h or similar.

Diego



More information about the MPlayer-dev-eng mailing list