[MPlayer-dev-eng] [PATCH] a few more warnings

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Fri Mar 18 05:59:26 CET 2005


Hi,

On Wednesday, 02 March 2005 at 21:55, Michael Niedermayer wrote:
> Hi
> 
> On Wednesday 02 March 2005 08:42, Nico Sabbi wrote:
> > Dominik 'Rathann' Mierzejewski wrote:
> > >--- MPlayer-20050228/libmpdemux/muxer_lavf.c.warn 2005-02-22
> > > 00:16:12.000000000 +0100 +++
> > > MPlayer-20050228/libmpdemux/muxer_lavf.c 2005-02-28 02:39:26.000000000
> > > +0100 @@ -17,6 +17,7 @@
> > > #include "stheader.h"
> > > #include "../m_option.h"
> > > #include "avformat.h"
> > >+#include "avi.h"
> >
> > Michael ?
> 
> yes, this doesnt look good, rejected
> if u really want to suppress the warning then simply add the 3 prototypes to 
> the c file,

Done, new patch attached.

This one additionally fixes this:
audio_out.c:147: warning: implicit declaration of function `exit_player'
and the strlcpy() and strlcat() replacements.

Regards,
R.

-- 
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
 We stand between the darkness ... and the light."
        -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
-------------- next part --------------
--- MPlayer-20050318/libao2/audio_out.c.warn	2005-02-28 01:17:07.000000000 +0100
+++ MPlayer-20050318/libao2/audio_out.c	2005-03-18 04:44:54.000000000 +0100
@@ -7,6 +7,7 @@
 
 #include "mp_msg.h"
 #include "help_mp.h"
+#include "mplayer.h" /* for exit_player() */
 
 // there are some globals:
 ao_data_t ao_data={0,0,0,0,OUTBURST,-1,0};
--- MPlayer-20050318/libmpdemux/demux_lavf.c.warn	2005-02-28 01:17:13.000000000 +0100
+++ MPlayer-20050318/libmpdemux/demux_lavf.c	2005-03-18 04:44:54.000000000 +0100
@@ -240,6 +240,8 @@
             demuxer->video->id=i;
             demuxer->video->sh= demuxer->v_streams[i];            
             break;}
+        default:
+	    mp_msg(MSGT_HEADER,MSGL_WARN,"LAVF: unknown stream type\n");
         }
     }
     
--- MPlayer-20050318/libmpdemux/muxer_lavf.c.warn	2005-02-22 00:16:12.000000000 +0100
+++ MPlayer-20050318/libmpdemux/muxer_lavf.c	2005-03-18 05:51:34.000000000 +0100
@@ -18,6 +18,10 @@
 #include "../m_option.h"
 #include "avformat.h"
 
+extern unsigned int codec_get_wav_tag(int id);
+extern enum CodecID codec_get_bmp_id(unsigned int tag);
+extern enum CodecID codec_get_wav_id(unsigned int tag);
+
 typedef struct {
 	//AVInputFormat *avif;
 	AVFormatContext *oc;
@@ -145,7 +149,7 @@
 }
 
 
-static void fix_parameters(muxer_stream_t *stream, void *sh)
+static void fix_parameters(muxer_stream_t *stream)
 {
 	muxer_stream_priv_t *spriv = (muxer_stream_priv_t *) stream->priv;
 	AVCodecContext *ctx;
--- MPlayer-20050318/libvo/geometry.c.warn	2005-02-28 01:17:15.000000000 +0100
+++ MPlayer-20050318/libvo/geometry.c	2005-03-18 04:44:54.000000000 +0100
@@ -33,10 +33,10 @@
 		  {
 		   char percent[2];
 		   RESET_GEOMETRY
-		   if(sscanf(vo_geometry, "%i%%:%i%1[%]", &xper, &yper, &percent) != 3)
+		   if(sscanf(vo_geometry, "%i%%:%i%1[%]", &xper, &yper, percent) != 3)
 		   {
 		    RESET_GEOMETRY
-		    if(sscanf(vo_geometry, "%i:%i%1[%]", &xoff, &yper, &percent) != 3)
+		    if(sscanf(vo_geometry, "%i:%i%1[%]", &xoff, &yper, percent) != 3)
 		    {
 		     RESET_GEOMETRY
 		     if(sscanf(vo_geometry, "%i%%:%i", &xper, &yoff) != 2)
@@ -45,7 +45,7 @@
 		     if(sscanf(vo_geometry, "%i:%i", &xoff, &yoff) != 2)
 		     {
 		      RESET_GEOMETRY
-		      if(sscanf(vo_geometry, "%i%1[%]", &xper, &percent) != 2)
+		      if(sscanf(vo_geometry, "%i%1[%]", &xper, percent) != 2)
 		      {
 			mp_msg(MSGT_VO, MSGL_ERR,
 			    "-geometry must be in [WxH][+X+Y] | [X[%%]:[Y[%%]]] format, incorrect (%s)\n", vo_geometry);
--- MPlayer-20050318/osdep/strl.c.warn	2004-06-25 18:49:52.000000000 +0200
+++ MPlayer-20050318/osdep/strl.c	2005-03-18 04:44:54.000000000 +0100
@@ -7,7 +7,7 @@
 #include "../config.h"
 
 #ifndef HAVE_STRLCPY
-unsigned int strlcpy (char *dest, char *src, unsigned int size)
+unsigned int strlcpy (char *dest, const char *src, unsigned int size)
 {
 	register unsigned int i;
 
@@ -21,7 +21,7 @@
 #endif
 
 #ifndef HAVE_STRLCAT
-unsigned int strlcat (char *dest, char *src, unsigned int size)
+unsigned int strlcat (char *dest, const char *src, unsigned int size)
 {
 #if 0
 	register unsigned int i, j;
@@ -33,7 +33,8 @@
 	dest[i] = '\0';
 	return i;
 #else
-	register char *d = dest, *s = src;
+	register char *d = dest;
+	register const char *s = src;
 
 	for (; size > 0 && *d != '\0'; size--, d++);
 	for (; size > 0 && *s != '\0'; size--, d++, s++)
--- MPlayer-20050318/configure.warn	2005-03-18 04:44:54.000000000 +0100
+++ MPlayer-20050318/configure	2005-03-18 04:44:54.000000000 +0100
@@ -7056,13 +7056,13 @@
 /* Define this if your system has strlcpy */
 $_def_strlcpy
 #ifndef HAVE_STRLCPY
-unsigned int strlcpy (char *dest, char *src, unsigned int size);
+unsigned int strlcpy (char *dest, const char *src, unsigned int size);
 #endif
 
 /* Define this if your system has strlcat */
 $_def_strlcat
 #ifndef HAVE_STRLCAT
-unsigned int strlcat (char *dest, char *src, unsigned int size);
+unsigned int strlcat (char *dest, const char *src, unsigned int size);
 #endif
 
 /* Define this if your system has fseeko */


More information about the MPlayer-dev-eng mailing list