From: Benjamin Otte Date: Thu, 1 May 2003 20:57:40 +0000 (+0000) Subject: fix gcc 2.x compiler error, when variables aren't defined at the top. X-Git-Tag: BRANCH-ERROR-ROOT~251 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbe36c876baf8806f295c635fda03eaccf69ad48;p=platform%2Fupstream%2Fgstreamer.git fix gcc 2.x compiler error, when variables aren't defined at the top. Original commit message from CVS: fix gcc 2.x compiler error, when variables aren't defined at the top. --- diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y index a15bb59..12a8a0d 100644 --- a/gst/parse/grammar.y +++ b/gst/parse/grammar.y @@ -22,8 +22,8 @@ static uint __chains; gchar * __gst_parse_strdup (gchar *org) { + gchar *ret; __strings++; - gchar *ret; ret = g_strdup (org); /* g_print ("ALLOCATED STR (%3u): %p %s\n", __strings, ret, ret); */ return ret; @@ -407,12 +407,13 @@ gst_parse_perform_delayed_link (GstElement *src, const gchar *src_pad, GstPadTemplate *templ = (GstPadTemplate *) templs->data; if ((GST_PAD_TEMPLATE_DIRECTION (templ) == GST_PAD_SRC) && (GST_PAD_TEMPLATE_PRESENCE(templ) == GST_PAD_SOMETIMES)) { + DelayedLink *data = g_new (DelayedLink, 1); + /* TODO: maybe we should check if src_pad matches this template's names */ GST_DEBUG (GST_CAT_PIPELINE, "trying delayed link %s:%s to %s:%s", GST_ELEMENT_NAME (src), src_pad, GST_ELEMENT_NAME (sink), sink_pad); - DelayedLink *data = g_new (DelayedLink, 1); data->src_pad = g_strdup (src_pad); data->sink = sink; data->sink_pad = g_strdup (sink_pad);