diff --git a/modules/control/http/macro.c b/modules/control/http/macro.c index bab1964f4d5fdbfcdbe86acd280755a650b3e509..41c239f949c011708e84854166c45ff30a148e29 100644 --- a/modules/control/http/macro.c +++ b/modules/control/http/macro.c @@ -725,7 +725,7 @@ void E_(MacroDo)( httpd_file_sys_t *p_args, case MVLC_FLOAT: f = config_GetFloat( p_intf, m->param1 ); div = lldiv( f * 1000000 , 1000000 ); - sprintf( value, I64Fd".%06u", div.quot, + sprintf( value, "%lld.%06u", div.quot, (unsigned int)div.rem ); break; case MVLC_STRING: diff --git a/modules/control/http/rpn.c b/modules/control/http/rpn.c index 0bf7e10b5ef78733076ab849e9ce91d54fadd4d3..57ae1abc882ddfe65f70d97c0e5c635c0edd60f2 100644 --- a/modules/control/http/rpn.c +++ b/modules/control/http/rpn.c @@ -698,7 +698,7 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars, { char psz_value[20]; lldiv_t value = lldiv( val.f_float * 1000000, 1000000 ); - snprintf( psz_value, sizeof(psz_value), I64Fd".%06u", + snprintf( psz_value, sizeof(psz_value), "%lld.%06u", value.quot, (unsigned int)value.rem ); E_(SSPush)( st, psz_value ); break; @@ -795,7 +795,7 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars, char psz_string[20]; lldiv_t value = lldiv( config_GetFloat( p_intf, psz_variable ) * 1000000, 1000000 ); - snprintf( psz_string, sizeof(psz_string), I64Fd".%06u", + snprintf( psz_string, sizeof(psz_string), "%lld.%06u", value.quot, (unsigned int)value.rem ); E_(SSPush)( st, psz_string ); break; @@ -988,7 +988,7 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars, psz_val = vlc_input_item_GetInfo( p_item, _(VLC_META_INFO_CAT), _(VLC_META_TITLE) ); if( psz_val == NULL ) - psz_val == strdup( p_item->psz_name ); + psz_val = strdup( p_item->psz_name ); } else if( !strcmp( psz_meta, "ALBUM" ) ) { diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c index 89de16446c98e248f46a369f8faa1b69bd26f133..93259431148eb5be35ce04b7fe21e527faca87ae 100644 --- a/modules/demux/mp4/libmp4.c +++ b/modules/demux/mp4/libmp4.c @@ -67,9 +67,9 @@ #define MP4_GETSTRINGZ( p_str ) \ if( ( i_read > 0 )&&(p_peek[0] ) ) \ { \ - p_str = calloc( sizeof( char ), __MIN( strlen( p_peek ), i_read )+1);\ - memcpy( p_str, p_peek, __MIN( strlen( p_peek ), i_read ) ); \ - p_str[__MIN( strlen( p_peek ), i_read )] = 0; \ + p_str = calloc( sizeof( char ), __MIN( strlen( (char*)p_peek ), i_read )+1);\ + memcpy( p_str, p_peek, __MIN( strlen( (char*)p_peek ), i_read ) ); \ + p_str[__MIN( strlen( (char*)p_peek ), i_read )] = 0; \ p_peek += strlen( p_str ) + 1; \ i_read -= strlen( p_str ) + 1; \ } \ @@ -80,14 +80,15 @@ #define MP4_READBOX_ENTER( MP4_Box_data_TYPE_t ) \ - int64_t i_read = p_box->i_size; \ + uint64_t i_read = p_box->i_size; \ uint8_t *p_peek, *p_buff; \ - i_read = p_box->i_size; \ + int i_actually_read; \ if( !( p_peek = p_buff = malloc( i_read ) ) ) \ { \ return( 0 ); \ } \ - if( stream_Read( p_stream, p_peek, i_read ) < i_read )\ + i_actually_read = stream_Read( p_stream, p_peek, i_read ); \ + if( i_actually_read < 0 || (uint64_t)i_actually_read < i_read )\ { \ free( p_buff ); \ return( 0 ); \ @@ -817,7 +818,7 @@ static void MP4_FreeBox_ctts( MP4_Box_t *p_box ) FREENULL( p_box->data.p_ctts->i_sample_offset ); } -static int MP4_ReadLengthDescriptor( uint8_t **pp_peek, int64_t *i_read ) +static int MP4_ReadLengthDescriptor( uint8_t **pp_peek, uint64_t *i_read ) { unsigned int i_b; unsigned int i_len = 0; @@ -2070,7 +2071,7 @@ static int MP4_ReadBox_drms( stream_t *p_stream, MP4_Box_t *p_box ) static int MP4_ReadBox_0xa9xxx( stream_t *p_stream, MP4_Box_t *p_box ) { - int16_t i_length, i_dummy; + uint16_t i_length, i_dummy; MP4_READBOX_ENTER( MP4_Box_data_0xa9xxx_t ); diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h index a0d4186ecc9858a9d7b61c09909b663d1843a83d..e60618aa637d16f8936f826001c9921c4bbf8b0d 100644 --- a/modules/demux/mp4/libmp4.h +++ b/modules/demux/mp4/libmp4.h @@ -349,7 +349,7 @@ typedef struct MP4_Box_data_url_s uint8_t i_version; uint32_t i_flags; - unsigned char *psz_location; + char *psz_location; } MP4_Box_data_url_t; @@ -358,8 +358,8 @@ typedef struct MP4_Box_data_urn_s uint8_t i_version; uint32_t i_flags; - unsigned char *psz_name; - unsigned char *psz_location; + char *psz_name; + char *psz_location; } MP4_Box_data_urn_t; @@ -651,7 +651,7 @@ typedef struct MP4_Box_data_cprt_s /* 1 pad bit */ unsigned char i_language[3]; - unsigned char *psz_notice; + char *psz_notice; } MP4_Box_data_cprt_t; diff --git a/modules/demux/playlist/dvb.c b/modules/demux/playlist/dvb.c index cc4d90511bf225c2a2d77bb30cee31d0c347c6c4..403d5e3fafcb0cd1e9467233586e7fc3863ebd79 100644 --- a/modules/demux/playlist/dvb.c +++ b/modules/demux/playlist/dvb.c @@ -99,7 +99,6 @@ static int Demux( demux_t *p_demux ) while( (psz_line = stream_ReadLine( p_demux->s )) ) { - playlist_item_t *p_item; char **ppsz_options = NULL; int i, i_options = 0; char *psz_name = NULL; diff --git a/modules/demux/playlist/gvp.c b/modules/demux/playlist/gvp.c index 2d7efaf4e9d198faac90f031606c0786ec4aee37..8064cdea12751a45253bf611fac1d15bfc7358a8 100644 --- a/modules/demux/playlist/gvp.c +++ b/modules/demux/playlist/gvp.c @@ -66,7 +66,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args ); int E_(Import_GVP)( vlc_object_t *p_this ) { demux_t *p_demux = (demux_t *)p_this; - int i_size; byte_t *p_peek; CHECK_PEEK( p_peek, 12 ); diff --git a/modules/demux/playlist/shoutcast.c b/modules/demux/playlist/shoutcast.c index 36986aaec2f92f23adf8be0adb6ba826a7a27d2a..d47e41312eaaeb9b71fce73f3ada84624d025183 100644 --- a/modules/demux/playlist/shoutcast.c +++ b/modules/demux/playlist/shoutcast.c @@ -395,7 +395,6 @@ static int DemuxStation( demux_t *p_demux ) ( psz_base || ( psz_rt && psz_load && ( p_sys->b_adult || strcmp( psz_rt, "NC17" ) ) ) ) ) { - playlist_item_t *p_item; char *psz_mrl = NULL; if( psz_rt || psz_load ) { diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c index 0f0869fa8ee0a236af936d504c7caea14838b923..691c5975130496d3febf0d84950df6e8aa6e3734 100644 --- a/modules/misc/freetype.c +++ b/modules/misc/freetype.c @@ -754,12 +754,12 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out, } { - char *p_in_buffer, *p_out_buffer; + char *p_out_buffer; + const char *p_in_buffer = psz_string; size_t i_in_bytes, i_out_bytes, i_out_bytes_left, i_ret; i_in_bytes = strlen( psz_string ); i_out_bytes = i_in_bytes * sizeof( uint32_t ); i_out_bytes_left = i_out_bytes; - p_in_buffer = psz_string; p_out_buffer = (char *)psz_unicode; i_ret = vlc_iconv( iconv_handle, &p_in_buffer, &i_in_bytes, &p_out_buffer, &i_out_bytes_left ); diff --git a/modules/misc/logger.c b/modules/misc/logger.c index 8a0ee53d55ee456297ec30373ec652ba2ed277ae..d9c7dc194312eb9e6678cab9f5c3a6575e1c9e9d 100644 --- a/modules/misc/logger.c +++ b/modules/misc/logger.c @@ -449,7 +449,7 @@ static void DoRRD( intf_thread_t *p_intf ) lldiv_t dout = lldiv( p_playlist->p_stats->f_output_bitrate * 1000000, 1000 ); fprintf( p_intf->p_sys->p_rrd, - I64Fi":"I64Fd".%03u:"I64Fd".%03u:"I64Fd".%03u\n", + I64Fi":%lld.%03u:%lld.%03u:%lld.%03u\n", p_intf->p_sys->last_update/1000000, din.quot, (unsigned int)din.rem, ddm.quot, (unsigned int)ddm.rem, diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c index f2ec3417e2cdc576da48c07ea5a5758d8a80e293..ac1ae92ef0c0324dcc9a66d89d0446f5c0698415 100644 --- a/modules/misc/rtsp.c +++ b/modules/misc/rtsp.c @@ -1291,7 +1291,7 @@ static char *SDPGenerate( const vod_media_t *p_media, httpd_client_t *cl ) if( p_media->i_length > 0 ) { lldiv_t d = lldiv( p_media->i_length / 1000, 1000 ); - p += sprintf( p, "a=range:npt=0-"I64Fd".%03u\r\n", d.quot, + p += sprintf( p, "a=range:npt=0-%lld.%03u\r\n", d.quot, (unsigned)d.rem ); } diff --git a/modules/video_chroma/i420_rgb8.c b/modules/video_chroma/i420_rgb8.c index fd477566ff28be42c912a966dc1a2afb5438dadc..e5fae8fd3f5bd193ea7c31ec3926fbb968fd6f5a 100644 --- a/modules/video_chroma/i420_rgb8.c +++ b/modules/video_chroma/i420_rgb8.c @@ -47,7 +47,7 @@ void E_(I420_RGB8)( vout_thread_t *p_vout, picture_t *p_src, picture_t *p_dest ) uint8_t *p_v = p_src->V_PIXELS; vlc_bool_t b_hscale; /* horizontal scaling type */ - unsigned int i_vscale; /* vertical scaling type */ + int i_vscale; /* vertical scaling type */ unsigned int i_x, i_y; /* horizontal and vertical indexes */ unsigned int i_real_y; /* y % 4 */ int i_right_margin;