From 57ff3ea72fd30fa900c069bb948745f3bfdff9d1 Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Thu, 2 Jul 2015 07:23:23 +0200 Subject: [PATCH] appsrc: fix compiler warning Initialize min and max _get_property() to gets rid of these compiler warnings: gstappsrc.c:741:7: error: 'max' may be used uninitialized in this function g_value_set_int64 (value, max); ^ gstappsrc.c:733:7: error: 'min' may be used uninitialized in this function g_value_set_int64 (value, min); ^ Which happens because gcc doesn't know that GST_IS_APP_SRC will never fail here. https://bugzilla.gnome.org/show_bug.cgi?id=752052 --- gst-libs/gst/app/gstappsrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/app/gstappsrc.c b/gst-libs/gst/app/gstappsrc.c index 5a44a452ec..c011334061 100644 --- a/gst-libs/gst/app/gstappsrc.c +++ b/gst-libs/gst/app/gstappsrc.c @@ -758,7 +758,7 @@ gst_app_src_get_property (GObject * object, guint prop_id, GValue * value, break; case PROP_MIN_LATENCY: { - guint64 min; + guint64 min = 0; gst_app_src_get_latency (appsrc, &min, NULL); g_value_set_int64 (value, min); @@ -766,7 +766,7 @@ gst_app_src_get_property (GObject * object, guint prop_id, GValue * value, } case PROP_MAX_LATENCY: { - guint64 max; + guint64 max = 0; gst_app_src_get_latency (appsrc, NULL, &max); g_value_set_int64 (value, max);