From e88ecc367bc8cce7568bca8e1ebb4a38f78fbed7 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 18 Sep 2015 00:20:13 +1000 Subject: [PATCH] Don't throw compiler warnings with G_DISABLE_ASSERT Disable code that warns about unused variables when G_DISABLE_ASSERT is defined, as it is in tarballs and pre-releases. --- gst/audiomixer/gstaudioaggregator.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gst/audiomixer/gstaudioaggregator.c b/gst/audiomixer/gstaudioaggregator.c index c30bc64867..1d3dcb56b4 100644 --- a/gst/audiomixer/gstaudioaggregator.c +++ b/gst/audiomixer/gstaudioaggregator.c @@ -625,13 +625,18 @@ void gst_audio_aggregator_set_sink_caps (GstAudioAggregator * aagg, GstAudioAggregatorPad * pad, GstCaps * caps) { +#ifndef G_DISABLE_ASSERT gboolean valid; GST_OBJECT_LOCK (pad); valid = gst_audio_info_from_caps (&pad->info, caps); - GST_OBJECT_UNLOCK (pad); - g_assert (valid); + +#else + GST_OBJECT_LOCK (pad); + (void) gst_audio_info_from_caps (&pad->info, caps); + GST_OBJECT_UNLOCK (pad); +#endif }