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

Mizda Gábor gabrov at freemail.hu
Fri Jul 20 19:56:29 CEST 2007


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 vo_gamma_* vars can be removed safely, mplayer.c and command.c both 
includes
libvo/video_out.h.

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.

Greetings

Mizda Gabor
gabrov at freemail.hu


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ass_variables1.diff
Type: text/x-diff
Size: 1053 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070720/81200ec6/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ass_variables2.diff
Type: text/x-diff
Size: 533 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070720/81200ec6/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vo_gamma.diff
Type: text/x-diff
Size: 959 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070720/81200ec6/attachment-0002.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_path.diff
Type: text/x-diff
Size: 786 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070720/81200ec6/attachment-0003.diff>


More information about the MPlayer-dev-eng mailing list