[MPlayer-dev-eng] [PATCH] another batch of compilation warnings fixes (GUI too)
Arpi
arpi at thot.banki.hu
Thu Oct 10 02:15:35 CEST 2002
Hi,
> static uint32_t preinit(const char *vo_subdevice)
> {
> char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fixed
> something like
> char devname[255]=strdup((vo_subdevice!=NULL)?vo_subdevice:"/dev/mga_vid");
> But I don't want to hardcode the size, so I'm asking for your opinion.
no, it's much simpler: just add const to devname decl.
> Oh, and I've attached some patches to fix other warnings and one thing I
> thought could be done better:
> Gui/mplayer/gtk/fs.c:
> - if ( ( name[i] >='a' )&&( name[i] <= 'z' ) ) { tmp[c++]='['; tmp[c++]=name[i]; tmp[c++]=name[i] - 32; tmp[c++]=']'; }
> + if ( isalpha(name[i]) ) { tmp[c++]='['; tmp[c++]=name[i]; tmp[c++]=name[i] - 32; tmp[c++]=']'; }
is ctype.h standard on all mplayer-supported playforms?
> - int i;
> +/* int i;*/
unused? unsure?
> {
> - char ** tmp = *( (char **)gui_opts[i].p );
> + char ** tmp = (char **)gui_opts[i].p;
> if ( tmp && tmp[0] && tmp[0][0] ) fprintf( f,"%s = \"%s\"\n",gui_opts[i].name,tmp[0] );
this looks like a nice 10l bug :)
A'rpi / Astral & ESP-team
--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
More information about the MPlayer-dev-eng
mailing list