]> git.sesse.net Git - vlc/commitdiff
* ALL: miscellaneous unsigned/signed warning fixes and pointer/int casts.
authorChristophe Massiot <massiot@videolan.org>
Mon, 11 Jul 2005 16:20:33 +0000 (16:20 +0000)
committerChristophe Massiot <massiot@videolan.org>
Mon, 11 Jul 2005 16:20:33 +0000 (16:20 +0000)
23 files changed:
modules/access/mms/mmsh.c
modules/access/mms/mmstu.c
modules/access/vcd/cdrom.h
modules/codec/a52.c
modules/codec/dts.c
modules/codec/flac.c
modules/codec/spudec/parse.c
modules/control/http.c
modules/control/telnet.c
modules/demux/aiff.c
modules/demux/avi/avi.c
modules/demux/m3u.c
modules/demux/mjpeg.c
modules/demux/mpeg/m4a.c
modules/demux/mpeg/mpga.c
modules/demux/nsv.c
modules/demux/nuv.c
modules/demux/playlist/m3u.c
modules/demux/playlist/old.c
modules/demux/playlist/pls.c
modules/demux/real.c
modules/misc/memcpy/fastmemcpy.h
modules/video_filter/deinterlace.c

index 696352ec88573c973fd1f4cd8eea33468643fef8..5442f3372078024c2ead2bc7ef3830660d1904fb 100644 (file)
@@ -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 );
 
index 5e6a4580ad849c3a3ea264d121def67efe7b457c..289004b3973dec0935558567454e54e9e9b905e3 100644 (file)
@@ -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;
index c5161ca79113a473a77daf9e6bc9d6cc88ee742a..4e9d3dff4277ecf9292b5f802007eda4fdc09f6b 100644 (file)
@@ -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
index 3dd1c41295f6a6ed42c6f9e884e88cb79ac493d6..5aa1d60c49801ab9a24bb262c455f29f6cf02238 100644 (file)
@@ -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,
index cd521e88e758d3ec1ef0129f6cc20b1676f6580e..f4803030c5d486a321df1b1c0f58ebb2f2f8453e 100644 (file)
@@ -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;
index 942f10574b598de9deecdb7dcb4e03264dbd4a3b..93781bfac9d233ed571d603c6f36d8a48b6c7057 100644 (file)
@@ -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;
index 083f3d7dc5af28b817f525493a303c8812a264a7..239fd6c00741c04fc07266aaa5924ec5f50718f4 100644 (file)
@@ -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 )
     {
index f5fbe3da0d7144c2c8327fad9f67e3727154a6d7..2c10b0173baf8b3e338b5d64796b598e8a7495d0 100644 (file)
@@ -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, "<vlc", 4 ) )
+        if( src + 4 < end  && !strncmp( (char *)src, "<vlc", 4 ) )
         {
             int i_skip;
             macro_t m;
@@ -2440,15 +2440,15 @@ static uint8_t *MacroSearch( uint8_t *src, uint8_t *end, int i_mvlc, vlc_bool_t
 }
 
 static void Execute( httpd_file_sys_t *p_args,
-                     uint8_t *p_request, int i_request,
-                     uint8_t **pp_data, int *pi_data,
-                     uint8_t **pp_dst,
-                     uint8_t *_src, uint8_t *_end )
+                     char *p_request, int i_request,
+                     char **pp_data, int *pi_data,
+                     char **pp_dst,
+                     char *_src, char *_end )
 {
     intf_thread_t  *p_intf = p_args->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 <vlc */
     while( src < end )
     {
-        uint8_t *p;
+        char *p;
         int i_copy;
 
-        p = strstr( src, "<vlc" );
+        p = (char *)strstr( (char *)src, "<vlc" );
         if( p < end && p == src )
         {
             macro_t m;
@@ -2476,7 +2476,7 @@ static void Execute( httpd_file_sys_t *p_args,
                 case MVLC_IF:
                 {
                     vlc_bool_t i_test;
-                    uint8_t    *endif;
+                    char    *endif;
 
                     EvaluateRPN( p_args->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 */
index 81e4cbf1728f6fec6c5788b189cdd5769fb44574..17744a6ae978440f67f77a782180b8c1f1eb9149 100644 (file)
@@ -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:
index 702426d78dca8427a4d4167c2fcf534e4d0dd6ce..a330823ac585eb682435ca00f01c95d49c9088cf 100644 (file)
@@ -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 )
             {
index b5fd619bc7f3b9bc4c15d323b8594021ba380719..dd7b9156c015b6dbfb82fd23bb6675a2028a59bb 100644 (file)
@@ -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 )
index 3c1390cf6feed65545314cb3c6f36cba26a1be3e..5a0da19a44f1620b2dc771650a086082396a489e 100644 (file)
@@ -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 )
index 17da12227e8c3e2478c9d64bcac3bb2c886fabf2..8de57fbecd0f51d5a5940f7060b83b71f8145b33 100644 (file)
@@ -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;
index 001afc5db162711864cfba5f51f76dd1c85626d9..fc55ab54ac54e16550f9326fc56e7d771251843e 100644 (file)
@@ -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;
index fca075df5032c1a40f7c1af0b92ce78c309bc67d..fefc4299a77d2a8018e96a6812f8e661305eaf83 100644 (file)
@@ -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] );
 
index 577472018f9fca111e89a4a40bbb29af2ed2109b..01a628a34d542689f6a92a604a42bc5bbd93d221 100644 (file)
@@ -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 )
                 {
index 4eaab88991557a8ebb4db45f09a1933777d43ca1..0705efa3b2feacaba2dc6309348bf266796bbeee 100644 (file)
@@ -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 ) );
index 4e3ba7d6993b6991a3aacec24b409430a7fb4573..1f9e394f9cb7a55280336a956e996620d707cb17 100644 (file)
@@ -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 ) )
     {
         ;
     }
index 941b2a0a1dd57b7f0851bc546bb47defb1f8a87a..81c65c1cca4ace11cabf0de29878fb5b1174b499 100644 (file)
@@ -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");
 
index 2a788e4ee6b4218909bc5b654660e841bb5f8a9a..8dbbc3323ee87e9d10bd86443884ebeb2c85029b 100644 (file)
@@ -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 ) )
     {
         ;
     }
index 7ce59865a47684c9df531b95b3eb8b3953f37a99..3c66acf822078bd5703b64f08a4d4f0fd86b746a 100644 (file)
@@ -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;
index 40c060f6f2b6cf9bc03573a07ee5e4048b199119..98fc868e30722faddac577f1e2546d2105debbb1 100644 (file)
@@ -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)
index 6dd4281a4a8b512bec48d9f4ab9fea251c71f0c2..ba3255d93ee35f76264cf6c495e34a42939dbd85 100644 (file)
@@ -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;
     }