video_filter: fix warnings
[vlc.git] / modules / video_filter / mosaic.c
index d12a6b0..8defef0 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#define _GNU_SOURCE
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
-#include <math.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <vlc/vlc.h>
 #include <vlc_vout.h>
 
+#include <math.h>
+
 #ifdef HAVE_LIMITS_H
 #   include <limits.h> /* INT_MAX */
 #endif
@@ -202,10 +203,10 @@ vlc_module_begin();
 
     add_integer( CFG_PREFIX "borderw", 0, NULL,
                  BORDERW_TEXT, BORDERW_LONGTEXT, VLC_TRUE );
-        add_deprecated( CFG_PREFIX "vborder", VLC_FALSE );
+        add_deprecated_alias( CFG_PREFIX "vborder" );
     add_integer( CFG_PREFIX "borderh", 0, NULL,
                  BORDERH_TEXT, BORDERH_LONGTEXT, VLC_TRUE );
-        add_deprecated( CFG_PREFIX "hborder", VLC_FALSE );
+        add_deprecated_alias( CFG_PREFIX "hborder" );
 
     add_integer( CFG_PREFIX "position", 0, NULL,
                  POS_TEXT, POS_LONGTEXT, VLC_FALSE );
@@ -284,7 +285,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_global = p_filter->p_libvlc_global;
+    vlc_object_t *p_libvlc = VLC_OBJECT( p_filter->p_libvlc );
     char *psz_order;
     char *psz_offsets;
     int i_index;
@@ -306,8 +307,8 @@ static int CreateFilter( vlc_object_t *p_this )
     vlc_mutex_init( p_filter, &p_sys->lock );
     vlc_mutex_lock( &p_sys->lock );
 
-    var_Create( p_libvlc_global, "mosaic-lock", VLC_VAR_MUTEX );
-    var_Get( p_libvlc_global, "mosaic-lock", &val );
+    var_Create( p_libvlc, "mosaic-lock", VLC_VAR_MUTEX );
+    var_Get( p_libvlc, "mosaic-lock", &val );
     p_sys->p_lock = val.p_address;
 
     config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options,
@@ -736,6 +737,7 @@ static int MosaicCallback( vlc_object_t *p_this, char const *psz_var,
                             vlc_value_t oldval, vlc_value_t newval,
                             void *p_data )
 {
+    VLC_UNUSED(oldval);
     filter_sys_t *p_sys = (filter_sys_t *) p_data;
 
 #define VAR_IS( a ) !strcmp( psz_var, CFG_PREFIX a )