validate/media-info: silence unsed variable warning
authorMatthew Waters <matthew@centricular.com>
Mon, 28 Mar 2022 10:15:15 +0000 (21:15 +1100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 28 Mar 2022 10:30:23 +0000 (10:30 +0000)
Fixes:

../validate/gst/validate/gst-validate-media-info.c:714:28: error: variable 'total_sink_count' set but not used [-Werror,-Wunused-but-set-variable]
  guint id, ncounters = 0, total_sink_count = 0;
                           ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>

subprojects/gst-devtools/validate/gst/validate/gst-validate-media-info.c

index ed1113f..c5fc3db 100644 (file)
@@ -711,7 +711,10 @@ check_and_remove_input_selector_counters (GstElement * element,
   gboolean done = FALSE;
   GstPad *pad;
   GValue value = { 0, };
-  guint id, ncounters = 0, total_sink_count = 0;
+  guint id, ncounters = 0;
+#if 0
+  guint total_sink_count = 0;
+#endif
   BufferCountData *bcd, **bcds =
       g_malloc0 (sizeof (BufferCountData *) * element->numpads);
   gboolean ret = TRUE;
@@ -725,7 +728,9 @@ check_and_remove_input_selector_counters (GstElement * element,
         bcd = g_object_get_data (G_OBJECT (pad), "buffer-count-data");
         if (GST_PAD_IS_SINK (pad)) {
           bcds[++ncounters] = bcd;
+#if 0
           total_sink_count += bcd->counter;
+#endif
         } else {
           bcds[0] = bcd;
         }