[vlc-devel] [PATCH] Compiler warnings fixes
Austin English
austinenglish at gmail.com
Mon Apr 6 00:21:58 CEST 2009
--
-Austin
-------------- next part --------------
diff --git a/src/input/vlmshell.c b/src/input/vlmshell.c
index da79d1f..81b3748 100644
--- a/src/input/vlmshell.c
+++ b/src/input/vlmshell.c
@@ -275,7 +275,7 @@ static int ExecuteDel( vlm_t *p_vlm, const char *psz_name, vlm_message_t **pp_st
return VLC_EGENERIC;
}
- *pp_status = vlm_MessageNew( "del", vlm_NULL );
+ *pp_status = vlm_MessageNew( "del", "%s", vlm_NULL );
return VLC_SUCCESS;
}
@@ -312,7 +312,7 @@ static int ExecuteHelp( vlm_message_t **pp_status )
#define MessageAddChild( a ) \
vlm_MessageAdd( message_child, vlm_MessageNew( a, vlm_NULL ) );
- *pp_status = vlm_MessageNew( "help", vlm_NULL );
+ *pp_status = vlm_MessageNew( "help", "%s", vlm_NULL );
message_child = MessageAdd( "Commands Syntax:" );
MessageAddChild( "new (name) vod|broadcast|schedule [properties]" );
@@ -525,7 +525,7 @@ static int ExecuteControl( vlm_t *p_vlm, const char *psz_name, const int i_arg,
*pp_status = vlm_MessageNew( "control", "unknown error" );
return VLC_SUCCESS;
}
- *pp_status = vlm_MessageNew( "control", vlm_NULL );
+ *pp_status = vlm_MessageNew( "control", "%s", vlm_NULL );
return VLC_SUCCESS;
}
@@ -559,7 +559,7 @@ static int ExecuteSave( vlm_t *p_vlm, const char *psz_file, vlm_message_t **pp_s
free( psz_save );
- *pp_status = vlm_MessageNew( "save", vlm_NULL );
+ *pp_status = vlm_MessageNew( "save", "%s", vlm_NULL );
return VLC_SUCCESS;
error:
@@ -617,7 +617,7 @@ static int ExecuteLoad( vlm_t *p_vlm, const char *psz_url, vlm_message_t **pp_st
free( psz_buffer );
- *pp_status = vlm_MessageNew( "load", vlm_NULL );
+ *pp_status = vlm_MessageNew( "load", "%s", vlm_NULL );
return VLC_SUCCESS;
}
@@ -671,7 +671,7 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
i++;
}
}
- *pp_status = vlm_MessageNew( psz_cmd, vlm_NULL );
+ *pp_status = vlm_MessageNew( psz_cmd, "%s", vlm_NULL );
return VLC_SUCCESS;
error:
@@ -797,7 +797,7 @@ static int ExecuteMediaProperty( vlm_t *p_vlm, int64_t id, bool b_new,
i_result = vlm_ControlInternal( p_vlm, VLM_CHANGE_MEDIA, p_cfg );
vlm_media_Delete( p_cfg );
- *pp_status = vlm_MessageNew( psz_cmd, vlm_NULL );
+ *pp_status = vlm_MessageNew( psz_cmd, "%s", vlm_NULL );
return i_result;
error:
@@ -901,7 +901,7 @@ int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
/* support for comments */
if( i_command == 0 && *psz_command == '#')
{
- p_message = vlm_MessageNew( "", vlm_NULL );
+ p_message = vlm_MessageNew( "", "%s", vlm_NULL );
goto success;
}
@@ -935,7 +935,7 @@ int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
#define IF_EXECUTE( name, check, cmd ) if( !strcmp(ppsz_command[0], name ) ) { if( (check) ) goto syntax_error; if( (cmd) ) goto error; goto success; }
if( i_command == 0 )
{
- p_message = vlm_MessageNew( "", vlm_NULL );
+ p_message = vlm_MessageNew( "", "%s", vlm_NULL );
goto success;
}
else IF_EXECUTE( "del", (i_command != 2), ExecuteDel(p_vlm, ppsz_command[1], &p_message) )
@@ -1296,7 +1296,7 @@ static vlm_message_t *vlm_ShowMedia( vlm_media_sys_t *p_media )
vlm_message_t *p_msg_sub;
int i;
- p_msg = vlm_MessageNew( p_cfg->psz_name, vlm_NULL );
+ p_msg = vlm_MessageNew( p_cfg->psz_name, "%s", vlm_NULL );
vlm_MessageAdd( p_msg,
vlm_MessageNew( "type", p_cfg->b_vod ? "vod" : "broadcast" ) );
vlm_MessageAdd( p_msg,
@@ -1309,7 +1309,7 @@ static vlm_message_t *vlm_ShowMedia( vlm_media_sys_t *p_media )
vlm_MessageAdd( p_msg,
vlm_MessageNew( "loop", p_cfg->broadcast.b_loop ? "yes" : "no" ) );
- p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "inputs", vlm_NULL ) );
+ p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "inputs", "%s", vlm_NULL ) );
for( i = 0; i < p_cfg->i_input; i++ )
{
char *psz_tmp;
@@ -1324,11 +1324,11 @@ static vlm_message_t *vlm_ShowMedia( vlm_media_sys_t *p_media )
vlm_MessageAdd( p_msg,
vlm_MessageNew( "output", "%s", p_cfg->psz_output ? p_cfg->psz_output : "" ) );
- p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "options", vlm_NULL ) );
+ p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "options", "%s", vlm_NULL ) );
for( i = 0; i < p_cfg->i_option; i++ )
- vlm_MessageAdd( p_msg_sub, vlm_MessageNew( p_cfg->ppsz_option[i], vlm_NULL ) );
+ vlm_MessageAdd( p_msg_sub, vlm_MessageNew( p_cfg->ppsz_option[i], "%s", vlm_NULL ) );
- p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "instances", vlm_NULL ) );
+ p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "instances", "%s", vlm_NULL ) );
for( i = 0; i < p_media->i_instance; i++ )
{
vlm_media_instance_sys_t *p_instance = p_media->instance[i];
@@ -1340,7 +1340,7 @@ static vlm_message_t *vlm_ShowMedia( vlm_media_sys_t *p_media )
if( p_instance->p_input )
var_Get( p_instance->p_input, "state", &val );
- p_msg_instance = vlm_MessageAdd( p_msg_sub, vlm_MessageNew( "instance" , vlm_NULL ) );
+ p_msg_instance = vlm_MessageAdd( p_msg_sub, vlm_MessageNew( "instance", "%s", vlm_NULL ) );
vlm_MessageAdd( p_msg_instance,
vlm_MessageNew( "name" , "%s", p_instance->psz_name ? p_instance->psz_name : "default" ) );
@@ -1386,7 +1386,7 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
{
if( media != NULL )
{
- vlm_message_t *p_msg = vlm_MessageNew( "show", vlm_NULL );
+ vlm_message_t *p_msg = vlm_MessageNew( "show", "%s", vlm_NULL );
if( p_msg )
vlm_MessageAdd( p_msg, vlm_ShowMedia( media ) );
return p_msg;
@@ -1400,9 +1400,9 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
vlm_message_t *msg_child;
char buffer[100];
- msg = vlm_MessageNew( "show", vlm_NULL );
+ msg = vlm_MessageNew( "show", "%s", vlm_NULL );
msg_schedule =
- vlm_MessageAdd( msg, vlm_MessageNew( schedule->psz_name, vlm_NULL ) );
+ vlm_MessageAdd( msg, vlm_MessageNew( schedule->psz_name, "%s", vlm_NULL ) );
vlm_MessageAdd( msg_schedule, vlm_MessageNew("type", "schedule") );
@@ -1459,12 +1459,12 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
vlm_MessageAdd( msg_schedule, vlm_MessageNew( "repeat", "%s", buffer ) );
msg_child =
- vlm_MessageAdd( msg_schedule, vlm_MessageNew("commands", vlm_NULL ) );
+ vlm_MessageAdd( msg_schedule, vlm_MessageNew("commands", "%s", vlm_NULL ) );
for( i = 0; i < schedule->i_command; i++ )
{
vlm_MessageAdd( msg_child,
- vlm_MessageNew( schedule->command[i], vlm_NULL ) );
+ vlm_MessageNew( schedule->command[i], "%s", vlm_NULL ) );
}
return msg;
@@ -1490,7 +1490,7 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
if( asprintf( &psz_count, "( %d broadcast - %d vod )", i_broadcast,
i_vod) == -1 )
return NULL;
- p_msg = vlm_MessageNew( "show", vlm_NULL );
+ p_msg = vlm_MessageNew( "show", "%s", vlm_NULL );
p_msg_child = vlm_MessageAdd( p_msg, vlm_MessageNew( "media", "%s",
psz_count ) );
free( psz_count );
@@ -1507,8 +1507,8 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
vlm_message_t *msg;
vlm_message_t *msg_child;
- msg = vlm_MessageNew( "show", vlm_NULL );
- msg_child = vlm_MessageAdd( msg, vlm_MessageNew( "schedule", vlm_NULL ) );
+ msg = vlm_MessageNew( "show", "%s", vlm_NULL );
+ msg_child = vlm_MessageAdd( msg, vlm_MessageNew( "schedule", "%s", vlm_NULL ) );
for( i = 0; i < vlm->i_schedule; i++ )
{
@@ -1517,7 +1517,7 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
mtime_t i_time, i_next_date;
msg_schedule = vlm_MessageAdd( msg_child,
- vlm_MessageNew( s->psz_name, vlm_NULL ) );
+ vlm_MessageNew( s->psz_name, "%s", vlm_NULL ) );
vlm_MessageAdd( msg_schedule,
vlm_MessageNew( "enabled", s->b_enabled ?
"yes" : "no" ) );
@@ -1576,7 +1576,7 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
else
{
- return vlm_MessageNew( "show", vlm_NULL );
+ return vlm_MessageNew( "show", "%s", vlm_NULL );
}
}
More information about the vlc-devel
mailing list