meson: fix tests build with --werror

Need to pass -DGST_DISABLE_DEPRECATED to avoid warnings when
testing deprecated API such as gst_uri_construct().

Also remove #ifndef GST_DISABLE_DEPRECATED guard from header
file, we don't use those any more for functions, the
GST_DEPRECATED_FOR macro is enough.
This commit is contained in:
Tim-Philipp Müller 2017-06-15 10:51:50 +01:00
parent 688d79033f
commit 25bf82a187
4 changed files with 1 additions and 11 deletions

View file

@ -487,10 +487,6 @@ gst_uri_get_location (const gchar * uri)
return unescaped;
}
#ifdef GST_DISABLE_DEPRECATED
gchar *gst_uri_construct (const gchar * protocol, const gchar * location);
#endif
/**
* gst_uri_construct:
* @protocol: Protocol for URI

View file

@ -147,12 +147,9 @@ gboolean gst_uri_has_protocol (const gchar * uri,
GST_EXPORT
gchar * gst_uri_get_location (const gchar * uri) G_GNUC_MALLOC;
#ifndef GST_DISABLE_DEPRECATED
GST_DEPRECATED_FOR(gst_uri_new)
gchar * gst_uri_construct (const gchar * protocol,
const gchar * location) G_GNUC_MALLOC;
#endif
GST_EXPORT
gchar * gst_filename_to_uri (const gchar * filename,
GError ** error) G_GNUC_MALLOC;

View file

@ -76,10 +76,6 @@ GST_START_TEST (test_uri_get_location)
GST_END_TEST;
#ifndef GST_REMOVE_DEPRECATED
#ifdef GST_DISABLE_DEPRECATED
gchar *gst_uri_construct (const gchar * protocol, const gchar * location);
#endif
GST_START_TEST (test_gst_uri_construct)
{
gchar *l;

View file

@ -121,6 +121,7 @@ test_defines = [
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
'-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
'-DGST_USE_UNSTABLE_API',
'-DGST_DISABLE_DEPRECATED',
]
glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep]