]> git.sesse.net Git - vlc/blobdiff - src/input/vlm.c
Use pkg-config for freetype and fribidi. Please report if your distro don't have...
[vlc] / src / input / vlm.c
index d0803969e786646e4a3bbd91655653a0deca65ff..027a55bf18121a865a2a8a44656c8d8e344fcf67 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 
 #include <stdio.h>
 #include <ctype.h>                                              /* tolower() */
 #include <assert.h>
 
+#include <vlc_vlm.h>
+
 #ifdef ENABLE_VLM
 
+#ifndef WIN32
+#   include <sys/time.h>                                   /* gettimeofday() */
+#endif
 
 #ifdef HAVE_TIME_H
 #   include <time.h>                                              /* ctime() */
@@ -43,7 +52,6 @@
 #include <vlc_input.h>
 #include "input_internal.h"
 #include <vlc_stream.h>
-#include <vlc_vlm.h>
 #include "vlm_internal.h"
 #include <vlc_vod.h>
 #include <vlc_charset.h>
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
+
+/* ugly kludge to avoid "null format string" warnings,
+ * even if we handle NULL format string in vlm_MessageNew() */
+static const char *vlm_NULL = NULL;
+
 /* */
 static int vlm_ControlInternal( vlm_t *, int, ... );
 
 /* */
 static vlm_message_t *vlm_Show( vlm_t *, vlm_media_sys_t *, vlm_schedule_sys_t *, const char * );
-static vlm_message_t *vlm_Help( vlm_t *, char * );
 
 static vlm_schedule_sys_t *vlm_ScheduleSearch( vlm_t *, const char * );
 
@@ -70,7 +82,7 @@ static int ExecuteCommand( vlm_t *, const char *, vlm_message_t ** );
 static int Manage( vlc_object_t * );
 
 static vlm_schedule_sys_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name );
-static void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched, const char *psz_name );
+static void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched );
 static int vlm_ScheduleSetup( vlm_schedule_sys_t *schedule, const char *psz_cmd,
                               const char *psz_value );
 
@@ -167,7 +179,7 @@ void vlm_Delete( vlm_t *p_vlm )
 
     vlc_object_release( p_vlm );
 
-    if( p_vlm->i_refcount > 0 )
+    if( p_vlm->p_internals->i_refcount > 0 )
     {
         vlc_mutex_unlock( lockval.p_address );
         return;
@@ -363,7 +375,7 @@ static int ExecuteDel( vlm_t *p_vlm, const char *psz_name, vlm_message_t **pp_st
 
     if( p_schedule != NULL )
     {
-        vlm_ScheduleDelete( p_vlm, p_schedule, NULL );
+        vlm_ScheduleDelete( p_vlm, p_schedule );
     }
     else if( p_media != NULL )
     {
@@ -388,7 +400,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", NULL );
+    *pp_status = vlm_MessageNew( "del", vlm_NULL );
     return VLC_SUCCESS;
 }
 
@@ -416,9 +428,52 @@ static int ExecuteShow( vlm_t *p_vlm, const char *psz_name, vlm_message_t **pp_s
     return VLC_SUCCESS;
 }
 
-static int ExecuteHelp( vlm_t *p_vlm, vlm_message_t **pp_status )
+static int ExecuteHelp( vlm_message_t *p_status )
 {
-    *pp_status = vlm_Help( p_vlm, NULL );
+    vlm_message_t *message_child;
+
+#define MessageAdd( a ) \
+        vlm_MessageAdd( p_status, vlm_MessageNew( a, vlm_NULL ) );
+#define MessageAddChild( a ) \
+        vlm_MessageAdd( message_child, vlm_MessageNew( a, vlm_NULL ) );
+
+    p_status = vlm_MessageNew( "help", vlm_NULL );
+
+    message_child = MessageAdd( "Commands Syntax:" );
+    MessageAddChild( "new (name) vod|broadcast|schedule [properties]" );
+    MessageAddChild( "setup (name) (properties)" );
+    MessageAddChild( "show [(name)|media|schedule]" );
+    MessageAddChild( "del (name)|all|media|schedule" );
+    MessageAddChild( "control (name) [instance_name] (command)" );
+    MessageAddChild( "save (config_file)" );
+    MessageAddChild( "export" );
+    MessageAddChild( "load (config_file)" );
+
+    message_child = MessageAdd( "Media Proprieties Syntax:" );
+    MessageAddChild( "input (input_name)" );
+    MessageAddChild( "inputdel (input_name)|all" );
+    MessageAddChild( "inputdeln input_number" );
+    MessageAddChild( "output (output_name)" );
+    MessageAddChild( "option (option_name)[=value]" );
+    MessageAddChild( "enabled|disabled" );
+    MessageAddChild( "loop|unloop (broadcast only)" );
+    MessageAddChild( "mux (mux_name)" );
+
+    message_child = MessageAdd( "Schedule Proprieties Syntax:" );
+    MessageAddChild( "enabled|disabled" );
+    MessageAddChild( "append (command_until_rest_of_the_line)" );
+    MessageAddChild( "date (year)/(month)/(day)-(hour):(minutes):"
+                     "(seconds)|now" );
+    MessageAddChild( "period (years_aka_12_months)/(months_aka_30_days)/"
+                     "(days)-(hours):(minutes):(seconds)" );
+    MessageAddChild( "repeat (number_of_repetitions)" );
+
+    message_child = MessageAdd( "Control Commands Syntax:" );
+    MessageAddChild( "play [input_number]" );
+    MessageAddChild( "pause" );
+    MessageAddChild( "stop" );
+    MessageAddChild( "seek [+-](percentage) | [+-](seconds)s | [+-](miliseconds)ms" );
+
     return VLC_SUCCESS;
 }
 
@@ -595,7 +650,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", NULL );
+    *pp_status = vlm_MessageNew( "control", vlm_NULL );
     return VLC_SUCCESS;
 }
 
@@ -626,7 +681,7 @@ static int ExecuteSave( vlm_t *p_vlm, const char *psz_file, vlm_message_t **pp_s
     free( psz_save );
     fclose( f );
 
-    *pp_status = vlm_MessageNew( "save", NULL );
+    *pp_status = vlm_MessageNew( "save", vlm_NULL );
     return VLC_SUCCESS;
 
 error:
@@ -681,7 +736,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", NULL );
+    *pp_status = vlm_MessageNew( "load", vlm_NULL );
     return VLC_SUCCESS;
 }
 
@@ -724,7 +779,7 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
             if( i + 1 >= i_property )
             {
                 if( b_new )
-                    vlm_ScheduleDelete( p_vlm, p_schedule, NULL );
+                    vlm_ScheduleDelete( p_vlm, p_schedule );
                 return ExecuteSyntaxError( psz_cmd, pp_status );
             }
 
@@ -732,7 +787,7 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
             i++;
         }
     }
-    *pp_status = vlm_MessageNew( psz_cmd, NULL );
+    *pp_status = vlm_MessageNew( psz_cmd, vlm_NULL );
     return VLC_SUCCESS;
 }
 
@@ -855,7 +910,7 @@ static int ExecuteMediaProperty( vlm_t *p_vlm, int64_t id, vlc_bool_t b_new,
     i_result = vlm_ControlInternal( p_vlm, VLM_CHANGE_MEDIA, p_cfg );
     vlm_media_Delete( p_cfg );
 
-    *pp_status = vlm_MessageNew( psz_cmd, NULL );
+    *pp_status = vlm_MessageNew( psz_cmd, vlm_NULL );
     return i_result;
 
 error:
@@ -867,6 +922,7 @@ error:
     }
     return VLC_EGENERIC;
 }
+
 static int ExecuteNew( vlm_t *p_vlm, const char *psz_name, const char *psz_type, const int i_property, char *ppsz_property[], vlm_message_t **pp_status )
 {
     /* Check name */
@@ -958,7 +1014,7 @@ static int ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
         /* support for comments */
         if( i_command == 0 && *psz_command == '#')
         {
-            p_message = vlm_MessageNew( "", NULL );
+            p_message = vlm_MessageNew( "", vlm_NULL );
             goto success;
         }
 
@@ -992,12 +1048,12 @@ static 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( "", NULL );
+        p_message = vlm_MessageNew( "", vlm_NULL );
         goto success;
     }
     else IF_EXECUTE( "del",     (i_command != 2),   ExecuteDel(p_vlm, ppsz_command[1], &p_message) )
     else IF_EXECUTE( "show",    (i_command > 2),    ExecuteShow(p_vlm, i_command > 1 ? ppsz_command[1] : NULL, &p_message) )
-    else IF_EXECUTE( "help",    (i_command != 1),   ExecuteHelp(p_vlm, &p_message) )
+    else IF_EXECUTE( "help",    (i_command != 1),   ExecuteHelp( p_message) )
     else IF_EXECUTE( "control", (i_command < 3),    ExecuteControl(p_vlm, ppsz_command[1], i_command - 2, &ppsz_command[2], &p_message) )
     else IF_EXECUTE( "save",    (i_command != 2),   ExecuteSave(p_vlm, ppsz_command[1], &p_message) )
     else IF_EXECUTE( "export",  (i_command != 1),   ExecuteExport(p_vlm, &p_message) )
@@ -1049,7 +1105,11 @@ static int64_t vlm_Date(void)
     ftime( &tm );
     return ((int64_t)tm.time) * 1000000 + ((int64_t)tm.millitm) * 1000;
 #else
-    return mdate();
+    struct timeval tv_date;
+
+    /* gettimeofday() cannot fail given &tv_date is a valid address */
+    (void)gettimeofday( &tv_date, NULL );
+    return (mtime_t) tv_date.tv_sec * 1000000 + (mtime_t) tv_date.tv_usec;
 #endif
 }
 
@@ -1081,8 +1141,7 @@ static vlm_schedule_sys_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name )
 }
 
 /* for now, simple delete. After, del with options (last arg) */
-static void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched,
-                         const char *psz_name )
+static void vlm_ScheduleDelete( vlm_t *vlm, vlm_schedule_sys_t *sched )
 {
     if( sched == NULL ) return;
 
@@ -1367,14 +1426,14 @@ vlm_message_t *vlm_MessageAdd( vlm_message_t *p_message,
 /*****************************************************************************
  * Misc utility functions
  *****************************************************************************/
-static vlm_message_t *vlm_ShowMedia( vlm_t *p_vlm, vlm_media_sys_t *p_media )
+static vlm_message_t *vlm_ShowMedia( vlm_media_sys_t *p_media )
 {
     vlm_media_t *p_cfg = &p_media->cfg;
     vlm_message_t *p_msg;
     vlm_message_t *p_msg_sub;
     int i;
 
-    p_msg = vlm_MessageNew( p_cfg->psz_name, 0 );
+    p_msg = vlm_MessageNew( p_cfg->psz_name, vlm_NULL );
     vlm_MessageAdd( p_msg,
                     vlm_MessageNew( "type", p_cfg->b_vod ? "vod" : "broadcast" ) );
     vlm_MessageAdd( p_msg,
@@ -1387,7 +1446,7 @@ static vlm_message_t *vlm_ShowMedia( vlm_t *p_vlm, 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", NULL ) );
+    p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "inputs", vlm_NULL ) );
     for( i = 0; i < p_cfg->i_input; i++ )
     {
         char *psz_tmp;
@@ -1400,11 +1459,11 @@ static vlm_message_t *vlm_ShowMedia( vlm_t *p_vlm, vlm_media_sys_t *p_media )
     vlm_MessageAdd( p_msg,
                     vlm_MessageNew( "output", p_cfg->psz_output ? p_cfg->psz_output : "" ) );
 
-    p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "options", 0 ) );
+    p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "options", vlm_NULL ) );
     for( i = 0; i < p_cfg->i_option; i++ )
-        vlm_MessageAdd( p_msg_sub, vlm_MessageNew( p_cfg->ppsz_option[i], 0 ) );
+        vlm_MessageAdd( p_msg_sub, vlm_MessageNew( p_cfg->ppsz_option[i], vlm_NULL ) );
 
-    p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "instances", NULL ) );
+    p_msg_sub = vlm_MessageAdd( p_msg, vlm_MessageNew( "instances", vlm_NULL ) );
     for( i = 0; i < p_media->i_instance; i++ )
     {
         vlm_media_instance_sys_t *p_instance = p_media->instance[i];
@@ -1416,7 +1475,7 @@ static vlm_message_t *vlm_ShowMedia( vlm_t *p_vlm, 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" , NULL ) );
+        p_msg_instance = vlm_MessageAdd( p_msg_sub, vlm_MessageNew( "instance" , vlm_NULL ) );
 
         vlm_MessageAdd( p_msg_instance,
                         vlm_MessageNew( "name" , p_instance->psz_name ? p_instance->psz_name : "default" ) );
@@ -1456,9 +1515,9 @@ 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", NULL );
+        vlm_message_t *p_msg = vlm_MessageNew( "show", vlm_NULL );
         if( p_msg )
-            vlm_MessageAdd( p_msg, vlm_ShowMedia( vlm, media ) );
+            vlm_MessageAdd( p_msg, vlm_ShowMedia( media ) );
         return p_msg;
     }
 
@@ -1470,9 +1529,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", NULL );
+        msg = vlm_MessageNew( "show", vlm_NULL );
         msg_schedule =
-            vlm_MessageAdd( msg, vlm_MessageNew( schedule->psz_name, 0 ) );
+            vlm_MessageAdd( msg, vlm_MessageNew( schedule->psz_name, vlm_NULL ) );
 
         vlm_MessageAdd( msg_schedule, vlm_MessageNew("type", "schedule") );
 
@@ -1540,12 +1599,12 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
         vlm_MessageAdd( msg_schedule, vlm_MessageNew( "repeat", buffer ) );
 
         msg_child =
-            vlm_MessageAdd( msg_schedule, vlm_MessageNew("commands", 0) );
+            vlm_MessageAdd( msg_schedule, vlm_MessageNew("commands", vlm_NULL ) );
 
         for( i = 0; i < schedule->i_command; i++ )
         {
            vlm_MessageAdd( msg_child,
-                           vlm_MessageNew( schedule->command[i], NULL ) );
+                           vlm_MessageNew( schedule->command[i], vlm_NULL ) );
         }
 
         return msg;
@@ -1570,12 +1629,12 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
 
         asprintf( &psz_count, "( %d broadcast - %d vod )", i_broadcast, i_vod);
 
-        p_msg = vlm_MessageNew( "show", NULL );
+        p_msg = vlm_MessageNew( "show", vlm_NULL );
         p_msg_child = vlm_MessageAdd( p_msg, vlm_MessageNew( "media", psz_count ) );
         free( psz_count );
 
         for( i = 0; i < vlm->i_media; i++ )
-            vlm_MessageAdd( p_msg_child, vlm_ShowMedia( vlm, vlm->media[i] ) );
+            vlm_MessageAdd( p_msg_child, vlm_ShowMedia( vlm->media[i] ) );
 
         return p_msg;
     }
@@ -1586,8 +1645,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", NULL );
-        msg_child = vlm_MessageAdd( msg, vlm_MessageNew( "schedule", NULL ) );
+        msg = vlm_MessageNew( "show", vlm_NULL );
+        msg_child = vlm_MessageAdd( msg, vlm_MessageNew( "schedule", vlm_NULL ) );
 
         for( i = 0; i < vlm->i_schedule; i++ )
         {
@@ -1596,7 +1655,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, 0 ) );
+                                           vlm_MessageNew( s->psz_name, vlm_NULL ) );
             vlm_MessageAdd( msg_schedule,
                             vlm_MessageNew( "enabled", s->b_enabled ?
                                             "yes" : "no" ) );
@@ -1655,62 +1714,8 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
 
     else
     {
-        return vlm_MessageNew( "show", NULL );
-    }
-}
-
-static vlm_message_t *vlm_Help( vlm_t *vlm, char *psz_filter )
-{
-    vlm_message_t *message, *message_child;
-
-#define MessageAdd( a ) \
-        vlm_MessageAdd( message, vlm_MessageNew( a, NULL ) );
-#define MessageAddChild( a ) \
-        vlm_MessageAdd( message_child, vlm_MessageNew( a, NULL ) );
-
-    if( psz_filter == NULL )
-    {
-        message = vlm_MessageNew( "help", NULL );
-
-        message_child = MessageAdd( "Commands Syntax:" );
-        MessageAddChild( "new (name) vod|broadcast|schedule [properties]" );
-        MessageAddChild( "setup (name) (properties)" );
-        MessageAddChild( "show [(name)|media|schedule]" );
-        MessageAddChild( "del (name)|all|media|schedule" );
-        MessageAddChild( "control (name) [instance_name] (command)" );
-        MessageAddChild( "save (config_file)" );
-        MessageAddChild( "export" );
-        MessageAddChild( "load (config_file)" );
-
-        message_child = MessageAdd( "Media Proprieties Syntax:" );
-        MessageAddChild( "input (input_name)" );
-        MessageAddChild( "inputdel (input_name)|all" );
-        MessageAddChild( "inputdeln input_number" );
-        MessageAddChild( "output (output_name)" );
-        MessageAddChild( "option (option_name)[=value]" );
-        MessageAddChild( "enabled|disabled" );
-        MessageAddChild( "loop|unloop (broadcast only)" );
-        MessageAddChild( "mux (mux_name)" );
-
-        message_child = MessageAdd( "Schedule Proprieties Syntax:" );
-        MessageAddChild( "enabled|disabled" );
-        MessageAddChild( "append (command_until_rest_of_the_line)" );
-        MessageAddChild( "date (year)/(month)/(day)-(hour):(minutes):"
-                         "(seconds)|now" );
-        MessageAddChild( "period (years_aka_12_months)/(months_aka_30_days)/"
-                         "(days)-(hours):(minutes):(seconds)" );
-        MessageAddChild( "repeat (number_of_repetitions)" );
-
-        message_child = MessageAdd( "Control Commands Syntax:" );
-        MessageAddChild( "play [input_number]" );
-        MessageAddChild( "pause" );
-        MessageAddChild( "stop" );
-        MessageAddChild( "seek [+-](percentage) | [+-](seconds)s | [+-](miliseconds)ms" );
-
-        return message;
+        return vlm_MessageNew( "show", vlm_NULL );
     }
-
-    return vlm_MessageNew( "help", NULL );
 }
 
 /*****************************************************************************
@@ -1849,6 +1854,7 @@ static char *Save( vlm_t *vlm )
     /* now we have the length of save */
 
     p = save = malloc( i_length );
+    if( !save ) return NULL;
     *save = '\0';
 
     p += sprintf( p, "%s", psz_header );
@@ -2341,6 +2347,7 @@ static int vlm_ControlMediaChange( vlm_t *p_vlm, vlm_media_t *p_cfg )
 
     return vlm_OnMediaUpdate( p_vlm, p_media );
 }
+
 static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id )
 {
     vlm_media_sys_t *p_media;
@@ -2368,12 +2375,18 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
         p_vlm->p_vod->p_data = p_vlm;
         p_vlm->p_vod->pf_media_control = vlm_MediaVodControl;
     }
-    if( p_cfg->b_vod )
-        p_vlm->i_vod++;
 
     p_media = malloc( sizeof( vlm_media_sys_t ) );
+    if( !p_media )
+    {
+        msg_Err( p_vlm, "out of memory" );
+        return VLC_ENOMEM;
+    }
     memset( p_media, 0, sizeof(vlm_media_sys_t) );
 
+    if( p_cfg->b_vod )
+        p_vlm->i_vod++;
+
     vlm_media_Copy( &p_media->cfg, p_cfg );
     p_media->cfg.id = p_vlm->i_id++;
     /* FIXME do we do something here if enabled is true ? */
@@ -2746,7 +2759,7 @@ static int vlm_ControlMediaInstanceClear( vlm_t *p_vlm, int64_t id )
 static int vlm_ControlScheduleClear( vlm_t *p_vlm )
 {
     while( p_vlm->i_schedule > 0 )
-        vlm_ScheduleDelete( p_vlm, p_vlm->schedule[0], NULL );
+        vlm_ScheduleDelete( p_vlm, p_vlm->schedule[0] );
 
     return VLC_SUCCESS;
 }
@@ -2906,31 +2919,38 @@ vlm_t *__vlm_New( vlc_object_t *a )
     msg_Err( a, "VideoLAN manager support is disabled" );
     return NULL;
 }
+
 void vlm_Delete( vlm_t *a )
 {
-    ;
+    (void)a;
 }
-int vlm_ExecuteCommand( vlm_t *a, char *b, vlm_message_t **c )
+
+int vlm_ExecuteCommand( vlm_t *a, const char *b, vlm_message_t **c )
 {
-    return -1;
+    abort();
 }
+
 vlm_message_t *vlm_MessageNew( const char *psz_name,
                                const char *psz_format, ... )
 {
+    (void)psz_name; (void)psz_format;
     return NULL;
 }
+
 vlm_message_t *vlm_MessageAdd( vlm_message_t *p_message,
                                vlm_message_t *p_child )
 {
-    return NULL;
+    abort();
 }
+
 void vlm_MessageDelete( vlm_message_t *a )
 {
-    ;
+    (void)a;
 }
 
 int vlm_Control( vlm_t *p_vlm, int i_query, ... )
 {
+    (void)p_vlm; (void)i_query;
     return VLC_EGENERIC;
 }