From cd4253028e94e600fb7d5199229dccd1250c9e71 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 23 Dec 2016 18:08:43 -0300 Subject: [PATCH] encoding-profile: Initialize variables to avoid build failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit encoding-profile.c: In function ‘get_profile_format_from_possible_factory_name’: encoding-profile.c:1532:6: error: ‘fact’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (fact) ^ encoding-profile.c: In function ‘profile_from_string’: encoding-profile.c:1720:6: error: ‘res’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (profile) ^ cc1: all warnings being treated as errors --- gst-libs/gst/pbutils/encoding-profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/pbutils/encoding-profile.c b/gst-libs/gst/pbutils/encoding-profile.c index c40fe28c7b..f9f4d3e518 100644 --- a/gst-libs/gst/pbutils/encoding-profile.c +++ b/gst-libs/gst/pbutils/encoding-profile.c @@ -1451,7 +1451,7 @@ gst_encoding_profile_find (const gchar * targetname, const gchar * profilename, static GstEncodingProfile * combo_search (const gchar * pname) { - GstEncodingProfile *res; + GstEncodingProfile *res = NULL; gchar **split; gint split_length; @@ -1478,7 +1478,7 @@ get_profile_format_from_possible_factory_name (const gchar * factory_desc, GList *tmp; GstCaps *caps = NULL, *tmpcaps = gst_caps_from_string (factory_desc); GstStructure *tmpstruct; - GstElementFactory *fact; + GstElementFactory *fact = NULL; *new_factory_name = NULL; if (gst_caps_get_size (tmpcaps) != 1)