Commit 79dfff4d authored by Damien Fouilleul's avatar Damien Fouilleul

- apply proper const casting since C++ has become more stringent

parent 5e0f332e
...@@ -373,7 +373,7 @@ int config_AutoSaveConfigFile( vlc_object_t * ); ...@@ -373,7 +373,7 @@ int config_AutoSaveConfigFile( vlc_object_t * );
#define change_integer_list( list, list_text, list_update_func ) \ #define change_integer_list( list, list_text, list_update_func ) \
p_config[i_config].i_list = sizeof(list)/sizeof(int); \ p_config[i_config].i_list = sizeof(list)/sizeof(int); \
p_config[i_config].pi_list = list; \ p_config[i_config].pi_list = (int *)list; \
p_config[i_config].ppsz_list_text = list_text; p_config[i_config].ppsz_list_text = list_text;
#define change_integer_range( min, max ) \ #define change_integer_range( min, max ) \
...@@ -391,7 +391,7 @@ int config_AutoSaveConfigFile( vlc_object_t * ); ...@@ -391,7 +391,7 @@ int config_AutoSaveConfigFile( vlc_object_t * );
p_config[i_config].ppf_action = (vlc_callback_t *) \ p_config[i_config].ppf_action = (vlc_callback_t *) \
realloc( p_config[i_config].ppf_action, \ realloc( p_config[i_config].ppf_action, \
(p_config[i_config].i_action + 1) * sizeof(void *) ); \ (p_config[i_config].i_action + 1) * sizeof(void *) ); \
p_config[i_config].ppsz_action_text = (char **)\ p_config[i_config].ppsz_action_text = (const char **)\
realloc( p_config[i_config].ppsz_action_text, \ realloc( p_config[i_config].ppsz_action_text, \
(p_config[i_config].i_action + 1) * sizeof(void *) ); \ (p_config[i_config].i_action + 1) * sizeof(void *) ); \
p_config[i_config].ppf_action[p_config[i_config].i_action] = pf_action; \ p_config[i_config].ppf_action[p_config[i_config].i_action] = pf_action; \
......
...@@ -77,12 +77,12 @@ static const char *ppsz_adev_text[] = { N_("Default"), N_("None") }; ...@@ -77,12 +77,12 @@ static const char *ppsz_adev_text[] = { N_("Default"), N_("None") };
static int pi_tuner_input[] = { 0, 1, 2 }; static int pi_tuner_input[] = { 0, 1, 2 };
static const char *ppsz_tuner_input_text[] = static const char *ppsz_tuner_input_text[] =
{N_("Default"), N_("Cable"), N_("Antenna")}; {N_("Default"), N_("Cable"), N_("Antenna")};
static int pi_amtuner_mode[] = { AMTUNER_MODE_DEFAULT, static const int pi_amtuner_mode[] = { AMTUNER_MODE_DEFAULT,
AMTUNER_MODE_TV, AMTUNER_MODE_TV,
AMTUNER_MODE_FM_RADIO, AMTUNER_MODE_FM_RADIO,
AMTUNER_MODE_AM_RADIO, AMTUNER_MODE_AM_RADIO,
AMTUNER_MODE_DSS }; AMTUNER_MODE_DSS };
static char *ppsz_amtuner_mode_text[] = { N_("Default"), static const char *ppsz_amtuner_mode_text[] = { N_("Default"),
N_("TV"), N_("TV"),
N_("FM radio"), N_("FM radio"),
N_("AM radio"), N_("AM radio"),
...@@ -1817,8 +1817,8 @@ static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name, ...@@ -1817,8 +1817,8 @@ static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name,
/* Keep the 2 first entries */ /* Keep the 2 first entries */
for( i = 2; i < p_item->i_list; i++ ) for( i = 2; i < p_item->i_list; i++ )
{ {
free( p_item->ppsz_list[i] ); free( const_cast<char *>(p_item->ppsz_list[i]) );
free( p_item->ppsz_list_text[i] ); free( const_cast<char *>(p_item->ppsz_list_text[i]) );
} }
/* TODO: Remove when no more needed */ /* TODO: Remove when no more needed */
p_item->ppsz_list[i] = NULL; p_item->ppsz_list[i] = NULL;
...@@ -1840,10 +1840,10 @@ static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name, ...@@ -1840,10 +1840,10 @@ static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name,
if( !list_devices.size() ) return VLC_SUCCESS; if( !list_devices.size() ) return VLC_SUCCESS;
p_item->ppsz_list = p_item->ppsz_list =
(char **)realloc( p_item->ppsz_list, (const char **)realloc( p_item->ppsz_list,
(list_devices.size()+3) * sizeof(char *) ); (list_devices.size()+3) * sizeof(char *) );
p_item->ppsz_list_text = p_item->ppsz_list_text =
(char **)realloc( p_item->ppsz_list_text, (const char **)realloc( p_item->ppsz_list_text,
(list_devices.size()+3) * sizeof(char *) ); (list_devices.size()+3) * sizeof(char *) );
list<string>::iterator iter; list<string>::iterator iter;
......
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