Commit 4c4c1053 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix some cast warnings

parent f3b32f6f
......@@ -94,8 +94,8 @@ static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name,
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static char *ppsz_devices[] = { "default" };
static char *ppsz_devices_text[] = { N_("Default") };
static const char *ppsz_devices[] = { "default" };
static const char *ppsz_devices_text[] = { N_("Default") };
vlc_module_begin();
set_shortname( "ALSA" );
set_description( _("ALSA audio output") );
......@@ -905,8 +905,8 @@ static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name,
/* Keep the first entrie */
for( i = 1; i < p_item->i_list; i++ )
{
free( p_item->ppsz_list[i] );
free( p_item->ppsz_list_text[i] );
free( (char *)p_item->ppsz_list[i] );
free( (char *)p_item->ppsz_list_text[i] );
}
/* TODO: Remove when no more needed */
p_item->ppsz_list[i] = NULL;
......@@ -978,10 +978,10 @@ static void GetDevicesForCard(module_config_t *p_item, int i_card)
snd_pcm_info_get_name(p_pcm_info), psz_device );
p_item->ppsz_list =
(char **)realloc( p_item->ppsz_list,
(const char **)realloc( p_item->ppsz_list,
(p_item->i_list + 2) * sizeof(char *) );
p_item->ppsz_list_text =
(char **)realloc( p_item->ppsz_list_text,
(const char **)realloc( p_item->ppsz_list_text,
(p_item->i_list + 2) * sizeof(char *) );
p_item->ppsz_list[ p_item->i_list ] = psz_device;
p_item->ppsz_list_text[ p_item->i_list ] = psz_descr;
......
......@@ -216,7 +216,7 @@ static sout_stream_id_t * AddOut( sout_stream_t *p_stream, es_format_t *p_fmt )
p_bridge = GetBridge( p_stream );
if ( p_bridge == NULL )
{
vlc_object_t *p_libvlc = p_stream->p_libvlc;
vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
vlc_value_t val;
p_bridge = malloc( sizeof( bridge_t ) );
......@@ -517,7 +517,7 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_t *id,
if( b_no_es )
{
vlc_object_t *p_libvlc = p_stream->p_libvlc;
vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
for ( i = 0; i < p_bridge->i_es_num; i++ )
free( p_bridge->pp_es[i] );
free( p_bridge->pp_es );
......
......@@ -173,7 +173,7 @@ static int Open( vlc_object_t *p_this )
{
sout_stream_t *p_stream = (sout_stream_t *)p_this;
sout_stream_sys_t *p_sys;
vlc_object_t *p_libvlc = p_this->p_libvlc;
vlc_object_t *p_libvlc = VLC_OBJECT( p_this->p_libvlc );
vlc_value_t val;
config_ChainParse( p_stream, CFG_PREFIX, ppsz_sout_options,
......@@ -314,7 +314,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
p_bridge = GetBridge( p_stream );
if ( p_bridge == NULL )
{
vlc_object_t *p_libvlc = p_stream->p_libvlc;
vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
vlc_value_t val;
p_bridge = malloc( sizeof( bridge_t ) );
......@@ -493,7 +493,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
if ( b_last_es )
{
vlc_object_t *p_libvlc = p_stream->p_libvlc;
vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
for ( i = 0; i < p_bridge->i_es_num; i++ )
free( p_bridge->pp_es[i] );
free( p_bridge->pp_es );
......
......@@ -179,7 +179,7 @@
#define HURRYUP_LONGTEXT N_( "The transcoder will drop frames if your CPU " \
"can't keep up with the encoding rate." )
static char *ppsz_deinterlace_type[] =
static const char *ppsz_deinterlace_type[] =
{
"deinterlace", "ffmpeg-deinterlace"
};
......
......@@ -591,11 +591,12 @@ static void BlendR24( filter_t *p_filter, picture_t *p_dst_pic,
#define TRANS_BITS 8
if( (i_pix_pitch == 4)
&& (((((int)p_dst)|((int)p_src1)|i_dst_pitch|i_src1_pitch) & 3) == 0) )
&& (((((intptr_t)p_dst)|((intptr_t)p_src1)|i_dst_pitch|i_src1_pitch)
& 3) == 0) )
{
/*
** if picture pixels are 32 bits long and lines addresses are 32 bit aligned,
** optimize rendering
** if picture pixels are 32 bits long and lines addresses are 32 bit
** aligned, optimize rendering
*/
uint32_t *p32_dst = (uint32_t *)p_dst;
uint32_t i32_dst_pitch = (uint32_t)(i_dst_pitch>>2);
......
......@@ -25,11 +25,11 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <math.h>
#include <vlc/vlc.h>
#include <vlc_vout.h>
#include <math.h>
#ifdef HAVE_LIMITS_H
# include <limits.h> /* INT_MAX */
#endif
......@@ -281,7 +281,7 @@ static int CreateFilter( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys;
vlc_object_t *p_libvlc = p_filter->p_libvlc;
vlc_object_t *p_libvlc = VLC_OBJECT( p_filter->p_libvlc );
char *psz_order;
char *psz_offsets;
int i_index;
......
......@@ -40,7 +40,7 @@ typedef struct bridge_t
#define GetBridge(a) __GetBridge( VLC_OBJECT(a) )
static bridge_t *__GetBridge( vlc_object_t *p_object )
{
vlc_object_t *p_libvlc = p_object->p_libvlc;
vlc_object_t *p_libvlc = VLC_OBJECT( p_object->p_libvlc );
bridge_t *p_bridge;
vlc_value_t val;
......
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