changeset 15058:f48dc20c9185

- fix gcc warnings, strlcat/strlcpy prototypes - fix bad sscanf usage in geometry.c
author rathann
date Wed, 06 Apr 2005 11:57:10 +0000
parents 719883aa0adf
children 0453cea5be15
files configure libao2/audio_out.c libmpdemux/muxer_lavf.c libvo/geometry.c osdep/strl.c
diffstat 5 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Wed Apr 06 11:53:45 2005 +0000
+++ b/configure	Wed Apr 06 11:57:10 2005 +0000
@@ -7058,13 +7058,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 */
--- a/libao2/audio_out.c	Wed Apr 06 11:53:45 2005 +0000
+++ b/libao2/audio_out.c	Wed Apr 06 11:57:10 2005 +0000
@@ -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};
--- a/libmpdemux/muxer_lavf.c	Wed Apr 06 11:53:45 2005 +0000
+++ b/libmpdemux/muxer_lavf.c	Wed Apr 06 11:57:10 2005 +0000
@@ -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;
--- a/libvo/geometry.c	Wed Apr 06 11:53:45 2005 +0000
+++ b/libvo/geometry.c	Wed Apr 06 11:57:10 2005 +0000
@@ -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);
--- a/osdep/strl.c	Wed Apr 06 11:53:45 2005 +0000
+++ b/osdep/strl.c	Wed Apr 06 11:57:10 2005 +0000
@@ -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++)