[MPlayer-dev-eng] [PATCH] warnings and ao_alsa question
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Tue Feb 6 00:43:24 CET 2007
mplayer.c:2982: warning: type defaults to ‘int’ in declaration of ‘global_ass_track’
mplayer.c:2982: warning: initialization makes integer from pointer without a cast
mplayer.c:2984: warning: assignment makes integer from pointer without a cast
mplayer.c:2985: warning: assignment makes pointer from integer without a cast
vo_directfb2.c:557: warning: passing argument 2 of ‘dfb->EnumVideoModes’ from incompatible pointer type
vo_directfb2.c:668: warning: enumeration value ‘DSPF_UNKNOWN’ not handled in switch
[...]
vo_directfb2.c:668: warning: enumeration value ‘DSPF_AYUV’ not handled in switch
vo_directfb2.c:1193: warning: suggest parentheses around + or - inside shift
vo_directfb2.c:1194: warning: suggest parentheses around + or - inside shift
vo_directfb2.c:1478: warning: enumeration value ‘DSPF_UNKNOWN’ not handled in switch
[...]
vo_directfb2.c:1478: warning: enumeration value ‘DSPF_AYUV’ not handled in switch
x11_common.c:215: warning: no return statement in function returning non-void
demux_ogg.c:253: warning: implicit declaration of function ‘subcp_recode’
Patch attached.
Unpatched and suspicious:
ao_alsa.c:272: warning: implicit declaration of function ‘snd_config_search_alias_hooks’
ao_alsa.c:294: warning: implicit declaration of function ‘snd_config_substitute’
-> Use of non-public functions? They're not in alsa headers...
Regards,
R.
--
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
--- MPlayer-22158/libvo/vo_directfb2.c.warn 2007-02-05 23:10:02.000000000 +0100
+++ MPlayer-22158/libvo/vo_directfb2.c 2007-02-05 23:55:36.000000000 +0100
@@ -449,7 +449,7 @@
} videomode_t;
-DFBEnumerationResult video_modes_callback( unsigned int width,unsigned int height,unsigned int bpp, void *data)
+DFBEnumerationResult video_modes_callback( int width, int height, int bpp, void *data)
{
videomode_t *params =(videomode_t *)data;
@@ -676,6 +676,7 @@
case DSPF_RGB15: bpp=15;break;
#endif
case DSPF_RGB332 : bpp=8;break;
+ default: return CONFIG_ERROR;
}
switch (dlc.pixelformat) {
@@ -1190,8 +1191,8 @@
if (!frame) {
if(mpi->flags&MP_IMGFLAG_PLANAR){
mpi->planes[0]= dst + yoffset * pitch + xoffset;
- mpi->planes[1]+= (yoffset * pitch) >> 2 + xoffset >> 1;
- mpi->planes[2]+= (yoffset * pitch) >> 2 + xoffset >> 1;
+ mpi->planes[1]+= ((yoffset * pitch) >> 2) + (xoffset >> 1);
+ mpi->planes[2]+= ((yoffset * pitch) >> 2) + (xoffset >> 1);
} else {
mpi->planes[0]=dst + yoffset * pitch + xoffset * (mpi->bpp >> 3);
}
@@ -1508,6 +1509,8 @@
case DSPF_YV12:
vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) dst) + pitch*y0 + 1*x0,pitch);
break;
+ default:
+ mp_msg(MSGT_VO, MSGL_WARN,"DirectFB: unsupported pixel format: %#x!",pixel_format);
}
unlock();
--- MPlayer-22158/libvo/x11_common.c.warn 2007-02-05 23:10:02.000000000 +0100
+++ MPlayer-22158/libvo/x11_common.c 2007-02-05 23:59:12.000000000 +0100
@@ -209,8 +209,7 @@
"Error code: %x, request code: %x, minor code: %x\n",
event->error_code, event->request_code, event->minor_code);
-// abort();
- //exit_player("X11 error");
+ return 0;
#undef MSGLEN
}
--- MPlayer-22158/subreader.h.warn 2007-01-25 02:32:31.000000000 +0100
+++ MPlayer-22158/subreader.h 2007-02-06 00:35:40.000000000 +0100
@@ -67,7 +67,7 @@
#endif
sub_data* sub_read_file (char *filename, float pts);
-subtitle* subcp_recode1 (subtitle *sub);
+subtitle* subcp_recode (subtitle *sub);
// enca_fd is the file enca uses to determine the codepage.
// setting to NULL disables enca.
struct stream_st;
--- MPlayer-22158/mplayer.c.warn 2007-02-05 23:10:02.000000000 +0100
+++ MPlayer-22158/mplayer.c 2007-02-05 23:38:52.000000000 +0100
@@ -2979,7 +2979,7 @@
}
#ifdef USE_ASS
if (ass_enabled) {
- static global_ass_track = NULL;
+ static ass_track_t* global_ass_track = NULL;
sh_sub_t *sh = (sh_sub_t *)d_dvdsub->sh;
if (!global_ass_track) global_ass_track = ass_default_track(ass_library);
ass_track = global_ass_track;
More information about the MPlayer-dev-eng
mailing list