Don't throw compiler warnings with G_DISABLE_ASSERT
authorJan Schmidt <jan@centricular.com>
Thu, 17 Sep 2015 14:20:13 +0000 (00:20 +1000)
committerJan Schmidt <jan@centricular.com>
Thu, 17 Sep 2015 14:29:51 +0000 (00:29 +1000)
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

index c30bc64..1d3dcb5 100644 (file)
@@ -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
 }