Commit f64ef866 authored by Laurent Aimar's avatar Laurent Aimar

Bunch of warning fixes.

parent 4913d654
...@@ -1419,7 +1419,7 @@ static void ASF_ObjectDumpDebug( vlc_object_t *p_obj, ...@@ -1419,7 +1419,7 @@ static void ASF_ObjectDumpDebug( vlc_object_t *p_obj,
char str[1024]; char str[1024];
int i; int i;
union asf_object_u *p_child; union asf_object_u *p_child;
char *psz_name; const char *psz_name;
/* Find the name */ /* Find the name */
for( i = 0; ASF_ObjectDumpDebugInfo[i].p_id != NULL; i++ ) for( i = 0; ASF_ObjectDumpDebugInfo[i].p_id != NULL; i++ )
......
...@@ -2600,8 +2600,9 @@ static void __get_token( char **ppsz_path, char **ppsz_token, int *pi_number ) ...@@ -2600,8 +2600,9 @@ static void __get_token( char **ppsz_path, char **ppsz_token, int *pi_number )
} }
static void __MP4_BoxGet( MP4_Box_t **pp_result, static void __MP4_BoxGet( MP4_Box_t **pp_result,
MP4_Box_t *p_box, char *psz_fmt, va_list args) MP4_Box_t *p_box, const char *psz_fmt, va_list args)
{ {
char *psz_dup;
char *psz_path; char *psz_path;
if( !p_box ) if( !p_box )
...@@ -2620,7 +2621,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result, ...@@ -2620,7 +2621,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
} }
// fprintf( stderr, "path:'%s'\n", psz_path ); // fprintf( stderr, "path:'%s'\n", psz_path );
psz_fmt = psz_path; /* keep this pointer, as it need to be unallocated */ psz_dup = psz_path; /* keep this pointer, as it need to be unallocated */
for( ; ; ) for( ; ; )
{ {
char *psz_token; char *psz_token;
...@@ -2632,7 +2633,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result, ...@@ -2632,7 +2633,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
if( !psz_token ) if( !psz_token )
{ {
FREENULL( psz_token ); FREENULL( psz_token );
free( psz_fmt ); free( psz_dup );
*pp_result = p_box; *pp_result = p_box;
return; return;
} }
...@@ -2647,7 +2648,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result, ...@@ -2647,7 +2648,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
if( !p_box ) if( !p_box )
{ {
free( psz_token ); free( psz_token );
free( psz_fmt ); free( psz_dup );
*pp_result = NULL; *pp_result = NULL;
return; return;
} }
...@@ -2664,7 +2665,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result, ...@@ -2664,7 +2665,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
if( !p_box ) if( !p_box )
{ {
free( psz_token ); free( psz_token );
free( psz_fmt ); free( psz_dup );
*pp_result = NULL; *pp_result = NULL;
return; return;
} }
...@@ -2681,7 +2682,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result, ...@@ -2681,7 +2682,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
if( !p_box ) if( !p_box )
{ {
free( psz_token ); free( psz_token );
free( psz_fmt ); free( psz_dup );
*pp_result = NULL; *pp_result = NULL;
return; return;
} }
...@@ -2705,7 +2706,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result, ...@@ -2705,7 +2706,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
if( !p_box ) if( !p_box )
{ {
free( psz_token ); free( psz_token );
free( psz_fmt ); free( psz_dup );
*pp_result = NULL; *pp_result = NULL;
return; return;
} }
...@@ -2721,7 +2722,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result, ...@@ -2721,7 +2722,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
{ {
// fprintf( stderr, "Argg malformed token \"%s\"",psz_token ); // fprintf( stderr, "Argg malformed token \"%s\"",psz_token );
FREENULL( psz_token ); FREENULL( psz_token );
free( psz_fmt ); free( psz_dup );
*pp_result = NULL; *pp_result = NULL;
return; return;
} }
...@@ -2739,7 +2740,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result, ...@@ -2739,7 +2740,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
* ex: /moov/trak[12] * ex: /moov/trak[12]
* ../mdia * ../mdia
*****************************************************************************/ *****************************************************************************/
MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, char *psz_fmt, ... ) MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, const char *psz_fmt, ... )
{ {
va_list args; va_list args;
MP4_Box_t *p_result; MP4_Box_t *p_result;
...@@ -2760,7 +2761,7 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, char *psz_fmt, ... ) ...@@ -2760,7 +2761,7 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, char *psz_fmt, ... )
* ex: /moov/trak[12] * ex: /moov/trak[12]
* ../mdia * ../mdia
*****************************************************************************/ *****************************************************************************/
int MP4_BoxCount( MP4_Box_t *p_box, char *psz_fmt, ... ) int MP4_BoxCount( MP4_Box_t *p_box, const char *psz_fmt, ... )
{ {
va_list args; va_list args;
int i_count; int i_count;
......
...@@ -932,7 +932,7 @@ void MP4_BoxDumpStructure( stream_t *p_input, MP4_Box_t *p_box ); ...@@ -932,7 +932,7 @@ void MP4_BoxDumpStructure( stream_t *p_input, MP4_Box_t *p_box );
* ex: /moov/trak[12] * ex: /moov/trak[12]
* ../mdia * ../mdia
*****************************************************************************/ *****************************************************************************/
MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, char *psz_fmt, ... ); MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, const char *psz_fmt, ... );
/***************************************************************************** /*****************************************************************************
* MP4_BoxCount: find number of box given a path relative to p_box * MP4_BoxCount: find number of box given a path relative to p_box
...@@ -943,7 +943,7 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, char *psz_fmt, ... ); ...@@ -943,7 +943,7 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, char *psz_fmt, ... );
* ex: /moov/trak * ex: /moov/trak
* ../mdia * ../mdia
*****************************************************************************/ *****************************************************************************/
int MP4_BoxCount( MP4_Box_t *p_box, char *psz_fmt, ... ); int MP4_BoxCount( MP4_Box_t *p_box, const char *psz_fmt, ... );
int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box ); int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box );
int MP4_ReadBox_sample_vide( stream_t *p_stream, MP4_Box_t *p_box ); int MP4_ReadBox_sample_vide( stream_t *p_stream, MP4_Box_t *p_box );
......
...@@ -484,7 +484,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -484,7 +484,7 @@ static int Open( vlc_object_t * p_this )
if( p_sys->track[i].b_ok ) if( p_sys->track[i].b_ok )
{ {
char *psz_cat; const char *psz_cat;
switch( p_sys->track[i].fmt.i_cat ) switch( p_sys->track[i].fmt.i_cat )
{ {
case( VIDEO_ES ): case( VIDEO_ES ):
......
...@@ -136,7 +136,7 @@ static int load_byte( unsigned char encoding_type, ...@@ -136,7 +136,7 @@ static int load_byte( unsigned char encoding_type,
return 0; return 0;
} }
char *nscdec( vlc_object_t *p_demux, char* p_encoded ) static char *nscdec( vlc_object_t *p_demux, char* p_encoded )
{ {
unsigned int i; unsigned int i;
unsigned char tmp; unsigned char tmp;
......
...@@ -132,8 +132,8 @@ static int Open( vlc_object_t * p_this ) ...@@ -132,8 +132,8 @@ static int Open( vlc_object_t * p_this )
/* Store the header and Seektable for avcodec */ /* Store the header and Seektable for avcodec */
fmt.i_extra = 22 + (p_sys->i_totalframes * 4) + 4; fmt.i_extra = 22 + (p_sys->i_totalframes * 4) + 4;
fmt.p_extra = malloc( fmt.i_extra ); fmt.p_extra = malloc( fmt.i_extra );
memcpy( fmt.p_extra, p_header, 22 ); memcpy( (uint8_t*)fmt.p_extra, p_header, 22 );
memcpy( fmt.p_extra+22, p_seektable, fmt.i_extra -22 ); memcpy( (uint8_t*)fmt.p_extra+22, p_seektable, fmt.i_extra -22 );
p_sys->p_es = es_out_Add( p_demux->out, &fmt ); p_sys->p_es = es_out_Add( p_demux->out, &fmt );
free( p_seektable ); free( p_seektable );
......
...@@ -71,7 +71,7 @@ struct demux_sys_t ...@@ -71,7 +71,7 @@ struct demux_sys_t
#define __EVEN( x ) ( ( (x)%2 != 0 ) ? ((x)+1) : (x) ) #define __EVEN( x ) ( ( (x)%2 != 0 ) ? ((x)+1) : (x) )
static int ChunkFind( demux_t *, char *, unsigned int * ); static int ChunkFind( demux_t *, const char *, unsigned int * );
static void FrameInfo_IMA_ADPCM( demux_t *, unsigned int *, int * ); static void FrameInfo_IMA_ADPCM( demux_t *, unsigned int *, int * );
static void FrameInfo_MS_ADPCM ( demux_t *, unsigned int *, int * ); static void FrameInfo_MS_ADPCM ( demux_t *, unsigned int *, int * );
...@@ -365,7 +365,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -365,7 +365,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
/***************************************************************************** /*****************************************************************************
* Local functions * Local functions
*****************************************************************************/ *****************************************************************************/
static int ChunkFind( demux_t *p_demux, char *fcc, unsigned int *pi_size ) static int ChunkFind( demux_t *p_demux, const char *fcc, unsigned int *pi_size )
{ {
uint8_t *p_peek; uint8_t *p_peek;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment