From d367c2f58e4bf09e07c5a57cda689fc01b29a7f5 Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Mon, 11 Jul 2005 16:20:33 +0000 Subject: [PATCH] * ALL: miscellaneous unsigned/signed warning fixes and pointer/int casts. --- modules/access/mms/mmsh.c | 4 +- modules/access/mms/mmstu.c | 2 +- modules/access/vcd/cdrom.h | 2 +- modules/codec/a52.c | 8 ++-- modules/codec/dts.c | 6 +-- modules/codec/flac.c | 9 +++-- modules/codec/spudec/parse.c | 2 +- modules/control/http.c | 60 +++++++++++++++--------------- modules/control/telnet.c | 10 ++--- modules/demux/aiff.c | 6 +-- modules/demux/avi/avi.c | 4 +- modules/demux/m3u.c | 4 +- modules/demux/mjpeg.c | 4 +- modules/demux/mpeg/m4a.c | 2 +- modules/demux/mpeg/mpga.c | 2 +- modules/demux/nsv.c | 15 +++++--- modules/demux/nuv.c | 4 +- modules/demux/playlist/m3u.c | 2 +- modules/demux/playlist/old.c | 2 +- modules/demux/playlist/pls.c | 2 +- modules/demux/real.c | 8 ++-- modules/misc/memcpy/fastmemcpy.h | 4 +- modules/video_filter/deinterlace.c | 2 +- 23 files changed, 87 insertions(+), 77 deletions(-) diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c index 696352ec88..5442f33720 100644 --- a/modules/access/mms/mmsh.c +++ b/modules/access/mms/mmsh.c @@ -206,7 +206,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) case ACCESS_GET_PRIVATE_ID_STATE: i_int = (int)va_arg( args, int ); - pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t ); + pb_bool = (vlc_bool_t *)va_arg( args, vlc_bool_t * ); if( i_int < 0 || i_int > 127 ) return VLC_EGENERIC; @@ -541,7 +541,7 @@ static int Describe( access_t *p_access, char **ppsz_location ) * and bitrate mutual exclusion(optional) */ E_( asf_HeaderParse )( &p_sys->asfh, p_sys->p_header, p_sys->i_header ); - msg_Dbg( p_access, "packet count=%lld packet size=%d", + msg_Dbg( p_access, "packet count="I64Fd" packet size=%d", p_sys->asfh.i_data_packets_count, p_sys->asfh.i_min_data_packet_size ); diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c index 5e6a4580ad..289004b397 100644 --- a/modules/access/mms/mmstu.c +++ b/modules/access/mms/mmstu.c @@ -292,7 +292,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) case ACCESS_GET_PRIVATE_ID_STATE: i_int = (int)va_arg( args, int ); - pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t ); + pb_bool = (vlc_bool_t *)va_arg( args, vlc_bool_t * ); if( i_int < 0 || i_int > 127 ) return VLC_EGENERIC; diff --git a/modules/access/vcd/cdrom.h b/modules/access/vcd/cdrom.h index c5161ca791..4e9d3dff42 100644 --- a/modules/access/vcd/cdrom.h +++ b/modules/access/vcd/cdrom.h @@ -71,7 +71,7 @@ typedef struct msf_s *****************************************************************************/ typedef struct entries_sect_s { - uint8_t psz_id[8]; /* "ENTRYVCD" */ + char psz_id[8]; /* "ENTRYVCD" */ uint8_t i_version; /* 0x02 VCD2.0 0x01 SVCD */ uint8_t i_sys_prof_tag; /* 0x01 if VCD1.1 diff --git a/modules/codec/a52.c b/modules/codec/a52.c index 3dd1c41295..5aa1d60c49 100644 --- a/modules/codec/a52.c +++ b/modules/codec/a52.c @@ -77,7 +77,8 @@ static int OpenPacketizer( vlc_object_t * ); static void CloseDecoder ( vlc_object_t * ); static void *DecodeBlock ( decoder_t *, block_t ** ); -static int SyncInfo ( const byte_t *, int *, int *, int *,int * ); +static int SyncInfo ( const byte_t *, unsigned int *, unsigned int *, + unsigned int *, int * ); static uint8_t *GetOutBuffer ( decoder_t *, void ** ); static aout_buffer_t *GetAoutBuffer( decoder_t * ); @@ -409,8 +410,9 @@ static block_t *GetSoutBuffer( decoder_t *p_dec ) * their SyncInfo... *****************************************************************************/ static int SyncInfo( const byte_t * p_buf, - int * pi_channels, int * pi_channels_conf, - int * pi_sample_rate, int * pi_bit_rate ) + unsigned int * pi_channels, + unsigned int * pi_channels_conf, + unsigned int * pi_sample_rate, int * pi_bit_rate ) { static const uint8_t halfrate[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3 }; static const int rate[] = { 32, 40, 48, 56, 64, 80, 96, 112, diff --git a/modules/codec/dts.c b/modules/codec/dts.c index cd521e88e7..f4803030c5 100644 --- a/modules/codec/dts.c +++ b/modules/codec/dts.c @@ -78,7 +78,7 @@ static void *DecodeBlock ( decoder_t *, block_t ** ); static inline int SyncCode( const uint8_t * ); static int SyncInfo ( const uint8_t *, unsigned int *, unsigned int *, - unsigned int *, unsigned int *, unsigned int * ); + unsigned int *, int *, unsigned int * ); static uint8_t *GetOutBuffer ( decoder_t *, void ** ); static aout_buffer_t *GetAoutBuffer( decoder_t * ); @@ -425,7 +425,7 @@ static const unsigned int ppi_dts_bitrate[] = static int SyncInfo16be( const uint8_t *p_buf, unsigned int *pi_audio_mode, unsigned int *pi_sample_rate, - unsigned int *pi_bit_rate, + int *pi_bit_rate, unsigned int *pi_frame_length ) { unsigned int i_frame_size; @@ -537,7 +537,7 @@ static int SyncInfo( const uint8_t *p_buf, unsigned int *pi_channels, unsigned int *pi_channels_conf, unsigned int *pi_sample_rate, - unsigned int *pi_bit_rate, + int *pi_bit_rate, unsigned int *pi_frame_length ) { unsigned int i_audio_mode; diff --git a/modules/codec/flac.c b/modules/codec/flac.c index 942f10574b..93781bfac9 100644 --- a/modules/codec/flac.c +++ b/modules/codec/flac.c @@ -126,7 +126,8 @@ static aout_buffer_t *DecodeBlock( decoder_t *, block_t ** ); #endif static block_t *PacketizeBlock( decoder_t *, block_t ** ); -static int SyncInfo( decoder_t *, uint8_t *, int *, int *, int *,int * ); +static int SyncInfo( decoder_t *, uint8_t *, unsigned int *, unsigned int *, + unsigned int *,int * ); #ifdef USE_LIBFLAC @@ -753,8 +754,10 @@ static void decoder_state_error( decoder_t *p_dec, * SyncInfo: parse FLAC sync info *****************************************************************************/ static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf, - int * pi_channels, int * pi_channels_conf, - int * pi_sample_rate, int * pi_bits_per_sample ) + unsigned int * pi_channels, + unsigned int * pi_channels_conf, + unsigned int * pi_sample_rate, + int * pi_bits_per_sample ) { decoder_sys_t *p_sys = p_dec->p_sys; int i_header, i_temp, i_read; diff --git a/modules/codec/spudec/parse.c b/modules/codec/spudec/parse.c index 083f3d7dc5..239fd6c007 100644 --- a/modules/codec/spudec/parse.c +++ b/modules/codec/spudec/parse.c @@ -43,7 +43,7 @@ static void Render ( decoder_t *, subpicture_t *, subpicture_data_t *); * AddNibble: read a nibble from a source packet and add it to our integer. *****************************************************************************/ static inline unsigned int AddNibble( unsigned int i_code, - uint8_t *p_src, int *pi_index ) + uint8_t *p_src, unsigned int *pi_index ) { if( *pi_index & 0x1 ) { diff --git a/modules/control/http.c b/modules/control/http.c index f5fbe3da0d..2c10b0173b 100644 --- a/modules/control/http.c +++ b/modules/control/http.c @@ -1369,7 +1369,7 @@ typedef struct char *param2; } macro_t; -static int FileLoad( FILE *f, uint8_t **pp_data, int *pi_data ) +static int FileLoad( FILE *f, char **pp_data, int *pi_data ) { int i_read; @@ -1390,11 +1390,11 @@ static int FileLoad( FILE *f, uint8_t **pp_data, int *pi_data ) return VLC_SUCCESS; } -static int MacroParse( macro_t *m, uint8_t *psz_src ) +static int MacroParse( macro_t *m, char *psz_src ) { - uint8_t *dup = strdup( psz_src ); - uint8_t *src = dup; - uint8_t *p; + char *dup = strdup( (char *)psz_src ); + char *src = dup; + char *p; int i_skip; #define EXTRACT( name, l ) \ @@ -1604,9 +1604,9 @@ static int StrToMacroType( char *name ) static void MacroDo( httpd_file_sys_t *p_args, macro_t *m, - uint8_t *p_request, int i_request, - uint8_t **pp_data, int *pi_data, - uint8_t **pp_dst ) + char *p_request, int i_request, + char **pp_data, int *pi_data, + char **pp_dst ) { intf_thread_t *p_intf = p_args->p_intf; intf_sys_t *p_sys = p_args->p_intf->p_sys; @@ -2387,14 +2387,14 @@ static void MacroDo( httpd_file_sys_t *p_args, #undef ALLOC } -static uint8_t *MacroSearch( uint8_t *src, uint8_t *end, int i_mvlc, vlc_bool_t b_after ) +static char *MacroSearch( char *src, char *end, int i_mvlc, vlc_bool_t b_after ) { int i_id; int i_level = 0; while( src < end ) { - if( src + 4 < end && !strncmp( src, "p_intf; - uint8_t *src, *dup, *end; - uint8_t *dst = *pp_dst; + char *src, *dup, *end; + char *dst = *pp_dst; src = dup = malloc( _end - _src + 1 ); end = src +( _end - _src ); @@ -2459,10 +2459,10 @@ static void Execute( httpd_file_sys_t *p_args, /* we parse searching vars, &p_args->stack, m.param1 ); if( SSPopN( &p_args->stack, p_args->vars ) ) @@ -2491,11 +2491,11 @@ static void Execute( httpd_file_sys_t *p_args, if( i_test == 0 ) { - uint8_t *start = MacroSearch( src, endif, MVLC_ELSE, VLC_TRUE ); + char *start = MacroSearch( src, endif, MVLC_ELSE, VLC_TRUE ); if( start ) { - uint8_t *stop = MacroSearch( start, endif, MVLC_END, VLC_FALSE ); + char *stop = MacroSearch( start, endif, MVLC_END, VLC_FALSE ); if( stop ) { Execute( p_args, p_request, i_request, pp_data, pi_data, &dst, start, stop ); @@ -2504,7 +2504,7 @@ static void Execute( httpd_file_sys_t *p_args, } else if( i_test == 1 ) { - uint8_t *stop; + char *stop; if( ( stop = MacroSearch( src, endif, MVLC_ELSE, VLC_FALSE ) ) == NULL ) { stop = MacroSearch( src, endif, MVLC_END, VLC_FALSE ); @@ -2520,9 +2520,9 @@ static void Execute( httpd_file_sys_t *p_args, } case MVLC_FOREACH: { - uint8_t *endfor = MacroSearch( src, end, MVLC_END, VLC_TRUE ); - uint8_t *start = src; - uint8_t *stop = MacroSearch( src, end, MVLC_END, VLC_FALSE ); + char *endfor = MacroSearch( src, end, MVLC_END, VLC_TRUE ); + char *start = src; + char *stop = MacroSearch( src, end, MVLC_END, VLC_FALSE ); if( stop ) { @@ -2640,9 +2640,11 @@ static void Execute( httpd_file_sys_t *p_args, ****************************************************************************/ static int HttpCallback( httpd_file_sys_t *p_args, httpd_file_t *p_file, - uint8_t *p_request, - uint8_t **pp_data, int *pi_data ) + uint8_t *_p_request, + uint8_t **_pp_data, int *pi_data ) { + char *p_request = (char *)_p_request; + char **pp_data = (char **)_pp_data; int i_request = p_request ? strlen( p_request ) : 0; char *p; FILE *f; @@ -2677,8 +2679,8 @@ static int HttpCallback( httpd_file_sys_t *p_args, else { int i_buffer; - uint8_t *p_buffer; - uint8_t *dst; + char *p_buffer; + char *dst; vlc_value_t val; char position[4]; /* percentage */ char time[12]; /* in seconds */ diff --git a/modules/control/telnet.c b/modules/control/telnet.c index 81e4cbf172..17744a6ae9 100644 --- a/modules/control/telnet.c +++ b/modules/control/telnet.c @@ -111,10 +111,10 @@ typedef struct { int i_mode; /* read or write */ int fd; - uint8_t buffer_read[1000]; // 1000 byte per command should be sufficient + char buffer_read[1000]; // 1000 byte per command should be sufficient char *buffer_write; - uint8_t *p_buffer_read; - uint8_t *p_buffer_write; // the position in the buffer + char *p_buffer_read; + char *p_buffer_write; // the position in the buffer int i_buffer_write; // the number of byte we still have to send int i_tel_cmd; // for specific telnet commands @@ -336,7 +336,7 @@ static void Run( intf_thread_t *p_intf ) switch( cl->i_tel_cmd ) { case 0: - switch( *cl->p_buffer_read ) + switch( *(uint8_t *)cl->p_buffer_read ) { case '\r': break; @@ -354,7 +354,7 @@ static void Run( intf_thread_t *p_intf ) } break; case 1: - switch( *cl->p_buffer_read ) + switch( *(uint8_t *)cl->p_buffer_read ) { case TEL_WILL: case TEL_WONT: case TEL_DO: case TEL_DONT: diff --git a/modules/demux/aiff.c b/modules/demux/aiff.c index 702426d78d..a330823ac5 100644 --- a/modules/demux/aiff.c +++ b/modules/demux/aiff.c @@ -104,7 +104,7 @@ static int Open( vlc_object_t *p_this ) uint8_t *p_peek; if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 ) return VLC_EGENERIC; - if( strncmp( &p_peek[0], "FORM", 4 ) || strncmp( &p_peek[8], "AIFF", 4 ) ) + if( strncmp( (char *)&p_peek[0], "FORM", 4 ) || strncmp( (char *)&p_peek[8], "AIFF", 4 ) ) { return VLC_EGENERIC; } @@ -134,7 +134,7 @@ static int Open( vlc_object_t *p_this ) msg_Dbg( p_demux, "chunk fcc=%4.4s size=%d", p_peek, i_size ); - if( !strncmp( &p_peek[0], "COMM", 4 ) ) + if( !strncmp( (char *)&p_peek[0], "COMM", 4 ) ) { if( stream_Peek( p_demux->s, &p_peek, 18 + 8 ) < 18 + 8 ) { @@ -149,7 +149,7 @@ static int Open( vlc_object_t *p_this ) msg_Dbg( p_demux, "COMM: channels=%d samples_frames=%d bits=%d rate=%d", GetWBE( &p_peek[8] ), GetDWBE( &p_peek[10] ), GetWBE( &p_peek[14] ), GetF80BE( &p_peek[16] ) ); } - else if( !strncmp( &p_peek[0], "SSND", 4 ) ) + else if( !strncmp( (char *)&p_peek[0], "SSND", 4 ) ) { if( stream_Peek( p_demux->s, &p_peek, 8 + 8 ) < 8 + 8 ) { diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c index b5fd619bc7..dd7b9156c0 100644 --- a/modules/demux/avi/avi.c +++ b/modules/demux/avi/avi.c @@ -212,8 +212,8 @@ static int Open( vlc_object_t * p_this ) for( i_peeker = 0; i_peeker < 188; i_peeker++ ) { - if( !strncmp( &p_peek[0], "RIFF", 4 ) && - !strncmp( &p_peek[8], "AVI ", 4 ) ) break; + if( !strncmp( (char *)&p_peek[0], "RIFF", 4 ) && + !strncmp( (char *)&p_peek[8], "AVI ", 4 ) ) break; p_peek++; } if( i_peeker == 188 ) diff --git a/modules/demux/m3u.c b/modules/demux/m3u.c index 3c1390cf6f..5a0da19a44 100644 --- a/modules/demux/m3u.c +++ b/modules/demux/m3u.c @@ -126,8 +126,8 @@ static int Activate( vlc_object_t * p_this ) /* We double check for file != m3u as some asx are just m3u file */ if( i_type != TYPE_M3U ) { - uint8_t *p_peek; - int i_size = stream_Peek( p_demux->s, &p_peek, MAX_LINE ); + char *p_peek; + int i_size = stream_Peek( p_demux->s, (uint8_t *)&p_peek, MAX_LINE ); i_size -= sizeof("[Reference]") - 1; if( i_size > 0 ) diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c index 17da12227e..8de57fbecd 100644 --- a/modules/demux/mjpeg.c +++ b/modules/demux/mjpeg.c @@ -188,7 +188,7 @@ static vlc_bool_t CheckMimeHeader( demux_t *p_demux, int *p_header_size ) *p_header_size = -2; return VLC_FALSE; } - if( strncmp( p_sys->p_peek, "--", 2 ) ) + if( strncmp( (char *)p_sys->p_peek, "--", 2 ) ) { *p_header_size = 0; return VLC_FALSE; @@ -476,7 +476,7 @@ static int MimeDemux( demux_t *p_demux ) } } } - if( !strncmp( p_sys->psz_separator, p_sys->p_peek + i + 2, + if( !strncmp( p_sys->psz_separator, (char *)(p_sys->p_peek + i + 2), strlen( p_sys->psz_separator ) ) ) { b_done = VLC_TRUE; diff --git a/modules/demux/mpeg/m4a.c b/modules/demux/mpeg/m4a.c index 001afc5db1..fc55ab54ac 100644 --- a/modules/demux/mpeg/m4a.c +++ b/modules/demux/mpeg/m4a.c @@ -94,7 +94,7 @@ static int Open( vlc_object_t * p_this ) msg_Err( p_demux, "cannot peek" ); return VLC_EGENERIC; } - if( !strncmp( p_peek, "ADIF", 4 ) ) + if( !strncmp( (char *)p_peek, "ADIF", 4 ) ) { msg_Err( p_demux, "ADIF file. Not yet supported. (Please report)" ); return VLC_EGENERIC; diff --git a/modules/demux/mpeg/mpga.c b/modules/demux/mpeg/mpga.c index fca075df50..fefc4299a7 100644 --- a/modules/demux/mpeg/mpga.c +++ b/modules/demux/mpeg/mpga.c @@ -202,7 +202,7 @@ static int Open( vlc_object_t * p_this ) i_skip = MPGA_MODE( header ) != 3 ? 21 : 13; } - if( i_skip + 8 < i_xing && !strncmp( &p_xing[i_skip], "Xing", 4 ) ) + if( i_skip + 8 < i_xing && !strncmp( (char *)&p_xing[i_skip], "Xing", 4 ) ) { unsigned int i_flags = GetDWBE( &p_xing[i_skip+4] ); diff --git a/modules/demux/nsv.c b/modules/demux/nsv.c index 577472018f..01a628a34d 100644 --- a/modules/demux/nsv.c +++ b/modules/demux/nsv.c @@ -88,9 +88,11 @@ static int Open( vlc_object_t *p_this ) uint8_t *p_peek; - if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 ) return VLC_EGENERIC; + if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 ) + return VLC_EGENERIC; - if( strncmp( p_peek, "NSVf", 4 ) && strncmp( p_peek, "NSVs", 4 )) + if( strncmp( (char *)p_peek, "NSVf", 4 ) + && strncmp( (char *)p_peek, "NSVs", 4 )) { /* In case we had force this demuxer we try to resynch */ if( strcmp( p_demux->psz_demux, "nsv" ) || ReSynch( p_demux ) ) @@ -153,14 +155,14 @@ static int Demux( demux_t *p_demux ) return 0; } - if( !strncmp( p_peek, "NSVf", 4 ) ) + if( !strncmp( (char *)p_peek, "NSVf", 4 ) ) { if( ReadNSVf( p_demux ) ) { return -1; } } - else if( !strncmp( p_peek, "NSVs", 4 ) ) + else if( !strncmp( (char *)p_peek, "NSVs", 4 ) ) { if( ReadNSVs( p_demux ) ) { @@ -380,7 +382,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) *****************************************************************************/ static int ReSynch( demux_t *p_demux ) { - uint8_t *p_peek; + uint8_t *p_peek; int i_skip; int i_peek; @@ -394,7 +396,8 @@ static int ReSynch( demux_t *p_demux ) while( i_skip < i_peek - 4 ) { - if( !strncmp( p_peek, "NSVf", 4 ) || !strncmp( p_peek, "NSVs", 4 ) ) + if( !strncmp( (char *)p_peek, "NSVf", 4 ) + || !strncmp( (char *)p_peek, "NSVs", 4 ) ) { if( i_skip > 0 ) { diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c index 4eaab88991..0705efa3b2 100644 --- a/modules/demux/nuv.c +++ b/modules/demux/nuv.c @@ -198,8 +198,8 @@ static int Open( vlc_object_t * p_this ) /* Check id */ if( stream_Peek( p_demux->s, &p_peek, 12 ) != 12 || - ( strncmp( p_peek, "MythTVVideo", 11 ) && - strncmp( p_peek, "NuppelVideo", 11 ) ) ) + ( strncmp( (char *)p_peek, "MythTVVideo", 11 ) && + strncmp( (char *)p_peek, "NuppelVideo", 11 ) ) ) return VLC_EGENERIC; p_sys = malloc( sizeof( demux_sys_t ) ); diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c index 4e3ba7d699..1f9e394f9c 100644 --- a/modules/demux/playlist/m3u.c +++ b/modules/demux/playlist/m3u.c @@ -61,7 +61,7 @@ int E_(Import_M3U)( vlc_object_t *p_this ) } psz_ext = strrchr ( p_demux->psz_path, '.' ); - if( !strncmp( p_peek, "#EXTM3U", 7 ) ) + if( !strncmp( (char *)p_peek, "#EXTM3U", 7 ) ) { ; } diff --git a/modules/demux/playlist/old.c b/modules/demux/playlist/old.c index 941b2a0a1d..81c65c1cca 100644 --- a/modules/demux/playlist/old.c +++ b/modules/demux/playlist/old.c @@ -50,7 +50,7 @@ int E_(Import_Old)( vlc_object_t *p_this ) if( stream_Peek( p_demux->s, &p_peek, 31 ) < 31 ) return VLC_EGENERIC; - if( strncmp( p_peek, PLAYLIST_FILE_HEADER , 31 ) ) return VLC_EGENERIC; + if( strncmp( (char *)p_peek, PLAYLIST_FILE_HEADER , 31 ) ) return VLC_EGENERIC; msg_Dbg( p_demux, "found valid old playlist file"); diff --git a/modules/demux/playlist/pls.c b/modules/demux/playlist/pls.c index 2a788e4ee6..8dbbc3323e 100644 --- a/modules/demux/playlist/pls.c +++ b/modules/demux/playlist/pls.c @@ -58,7 +58,7 @@ int E_(Import_PLS)( vlc_object_t *p_this ) if( stream_Peek( p_demux->s , &p_peek, 7 ) < 7 ) return VLC_EGENERIC; psz_ext = strrchr ( p_demux->psz_path, '.' ); - if( !strncasecmp( p_peek, "[playlist]", 10 ) ) + if( !strncasecmp( (char *)p_peek, "[playlist]", 10 ) ) { ; } diff --git a/modules/demux/real.c b/modules/demux/real.c index 7ce59865a4..3c66acf822 100644 --- a/modules/demux/real.c +++ b/modules/demux/real.c @@ -93,7 +93,7 @@ static int Open( vlc_object_t *p_this ) uint8_t *p_peek; if( stream_Peek( p_demux->s, &p_peek, 10 ) < 10 ) return VLC_EGENERIC; - if( strncmp( p_peek, ".RMF", 4 ) ) return VLC_EGENERIC; + if( strncmp( (char *)p_peek, ".RMF", 4 ) ) return VLC_EGENERIC; /* Fill p_demux field */ p_demux->pf_demux = Demux; @@ -181,7 +181,7 @@ static int Demux( demux_t *p_demux ) { return 0; } - if( strncmp( header, "DATA", 4 ) ) + if( strncmp( (char *)header, "DATA", 4 ) ) { return 0; } @@ -746,7 +746,7 @@ static int HeaderRead( demux_t *p_demux ) msg_Dbg( p_demux, " - specific data len=%d", i_len ); if( stream_Peek( p_demux->s, &p_peek, 34 ) >= 34 ) { - if( !strncmp( &p_peek[4], "VIDO", 4 ) ) + if( !strncmp( (char *)&p_peek[4], "VIDO", 4 ) ) { es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( p_peek[8], p_peek[9], p_peek[10], p_peek[11] ) ); @@ -781,7 +781,7 @@ static int HeaderRead( demux_t *p_demux ) TAB_APPEND( p_sys->i_track, p_sys->track, tk ); } - else if( !strncmp( p_peek, ".ra\xfd", 4 ) ) + else if( !strncmp( (char *)p_peek, ".ra\xfd", 4 ) ) { int i_version = GetWBE( &p_peek[4] ); uint8_t *p_extra = NULL; diff --git a/modules/misc/memcpy/fastmemcpy.h b/modules/misc/memcpy/fastmemcpy.h index 40c060f6f2..98fc868e30 100644 --- a/modules/misc/memcpy/fastmemcpy.h +++ b/modules/misc/memcpy/fastmemcpy.h @@ -246,7 +246,7 @@ void * fast_memcpy(void * to, const void * from, size_t len) } #else /* Align destination at BLOCK_SIZE boundary */ - for(; ((int)to & (BLOCK_SIZE-1)) && i>0; i--) + for(; ((ptrdiff_t)to & (BLOCK_SIZE-1)) && i>0; i--) { __asm__ __volatile__ ( #ifndef HAVE_MMX1 @@ -273,7 +273,7 @@ void * fast_memcpy(void * to, const void * from, size_t len) to = (void *) (((unsigned char *)to)+64); } -/* printf(" %d %d\n", (int)from&1023, (int)to&1023); */ +/* printf(" %p %p\n", (ptrdiff_t)from&1023, (ptrdiff_t)to&1023); */ /* Pure Assembly cuz gcc is a bit unpredictable ;) */ # if 0 if(i>=BLOCK_SIZE/64) diff --git a/modules/video_filter/deinterlace.c b/modules/video_filter/deinterlace.c index 6dd4281a4a..ba3255d93e 100644 --- a/modules/video_filter/deinterlace.c +++ b/modules/video_filter/deinterlace.c @@ -949,7 +949,7 @@ static void MergeSSE2( void *_p_dest, const void *_p_s1, const void *_p_s2, const uint8_t *p_s1 = (const uint8_t *)_p_s1; const uint8_t *p_s2 = (const uint8_t *)_p_s2; uint8_t* p_end; - while( (int)p_s1 % 16 ) + while( (ptrdiff_t)p_s1 % 16 ) { *p_dest++ = ( (uint16_t)(*p_s1++) + (uint16_t)(*p_s2++) ) >> 1; } -- 2.39.5