- fix gcc warnings, strlcat/strlcpy prototypes

- fix bad sscanf usage in geometry.c


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15059 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rathann 2005-04-06 11:57:10 +00:00
parent d621bc66d2
commit e3b183dc3f
5 changed files with 15 additions and 9 deletions

4
configure vendored
View File

@ -7058,13 +7058,13 @@ $_def_strsep
/* 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 */

View File

@ -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};

View File

@ -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 muxer_stream_t* lavf_new_stream(muxer_t *muxer, int type)
}
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;

View File

@ -33,10 +33,10 @@ int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh)
{
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 @@ int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh)
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);

View File

@ -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 @@ unsigned int strlcpy (char *dest, char *src, unsigned int size)
#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 @@ unsigned int strlcat (char *dest, char *src, unsigned int size)
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++)