From 25d2b8a6086fbdfd318c9f18f7c5112292b1814c Mon Sep 17 00:00:00 2001 From: Scott D Phillips Date: Fri, 16 Jun 2017 18:08:39 -0700 Subject: [PATCH] tests: dash & adaptivedemux: move iterator variable declaration out of `for` This is a c99-ism that gcc 4.8.5 errors on unless -std=c99 is specified. https://bugzilla.gnome.org/show_bug.cgi?id=783868 --- tests/check/elements/adaptive_demux_common.c | 7 +++++-- tests/check/elements/dash_mpd.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/check/elements/adaptive_demux_common.c b/tests/check/elements/adaptive_demux_common.c index 4e4e97fdba..207ff3f82d 100644 --- a/tests/check/elements/adaptive_demux_common.c +++ b/tests/check/elements/adaptive_demux_common.c @@ -130,10 +130,11 @@ gst_adaptive_demux_test_find_test_data_by_stream (GstAdaptiveDemuxTestCase * gchar *pad_name; GstAdaptiveDemuxTestExpectedOutput *ret = NULL; guint count = 0; + GList *walk; pad_name = gst_pad_get_name (stream->pad); fail_unless (pad_name != NULL); - for (GList * walk = testData->output_streams; walk; walk = g_list_next (walk)) { + for (walk = testData->output_streams; walk; walk = g_list_next (walk)) { GstAdaptiveDemuxTestExpectedOutput *td = walk->data; if (strcmp (td->name, pad_name) == 0) { ret = td; @@ -463,8 +464,10 @@ static void testSeekPostTestCallback (GstAdaptiveDemuxTestEngine * engine, gpointer user_data) { + GList *walk; + GstAdaptiveDemuxTestCase *testData = GST_ADAPTIVE_DEMUX_TEST_CASE (user_data); - for (GList * walk = testData->output_streams; walk; walk = g_list_next (walk)) { + for (walk = testData->output_streams; walk; walk = g_list_next (walk)) { GstAdaptiveDemuxTestExpectedOutput *td = walk->data; fail_if (td->segment_verification_needed); diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c index 3dc72e390a..8bea598c5d 100644 --- a/tests/check/elements/dash_mpd.c +++ b/tests/check/elements/dash_mpd.c @@ -3198,7 +3198,7 @@ GST_START_TEST (dash_mpdparser_adaptationSet_handling) { const gchar *periodName; guint adaptation_sets_count; - GList *adaptationSets; + GList *adaptationSets, *it; guint count = 0; const gchar *xml = @@ -3241,7 +3241,7 @@ GST_START_TEST (dash_mpdparser_adaptationSet_handling) adaptationSets = gst_mpd_client_get_adaptation_sets (mpdclient); fail_if (adaptationSets == NULL); - for (GList * it = adaptationSets; it; it = g_list_next (it)) { + for (it = adaptationSets; it; it = g_list_next (it)) { GstAdaptationSetNode *adapt_set; adapt_set = (GstAdaptationSetNode *) it->data; fail_if (adapt_set == NULL);