summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2008-01-14 12:11:43 +0000
committerTim-Philipp Müller <tim@centricular.net>2008-01-14 12:11:43 +0000
commit11118eabb9f3b33ce4ae11c4b1da2e34a51c7d35 (patch)
tree147aeae7337d8f690f4266ea08242d29210880e8 /gst
parent4fa1b883df6c2f9afa79ad1bd80fcef5472f0f8a (diff)
gst/: Initialise variables to work around (false) 'foo might be used uninitialized in this function' warnings by gcc-...
Original commit message from CVS: * gst/avi/gstavisubtitle.c: (gst_avi_subtitle_extract_file): * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_send): Initialise variables to work around (false) 'foo might be used uninitialized in this function' warnings by gcc-3.3.3 (#509298).
Diffstat (limited to 'gst')
-rw-r--r--gst/avi/gstavisubtitle.c4
-rw-r--r--gst/rtsp/gstrtspsrc.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/gst/avi/gstavisubtitle.c b/gst/avi/gstavisubtitle.c
index 6fdf5fea..4b498b35 100644
--- a/gst/avi/gstavisubtitle.c
+++ b/gst/avi/gstavisubtitle.c
@@ -78,7 +78,7 @@ gst_avi_subtitle_extract_file (GstAviSubtitle * sub, GstBuffer * buffer,
guint offset, guint len)
{
const gchar *input_enc = NULL;
- GstBuffer *ret;
+ GstBuffer *ret = NULL;
gchar *data;
data = (gchar *) GST_BUFFER_DATA (buffer) + offset;
@@ -111,6 +111,8 @@ gst_avi_subtitle_extract_file (GstAviSubtitle * sub, GstBuffer * buffer,
return NULL;
}
+ g_return_val_if_fail (ret != NULL || input_enc != NULL, NULL);
+
if (input_enc) {
GError *err = NULL;
gchar *utf8;
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 50ce4afe..2f02c361 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -3215,10 +3215,10 @@ gst_rtspsrc_send (GstRTSPSrc * src, GstRTSPMessage * request,
GstRTSPMessage * response, GstRTSPStatusCode * code)
{
GstRTSPStatusCode int_code = GST_RTSP_STS_OK;
- GstRTSPResult res;
+ GstRTSPResult res = GST_RTSP_ERROR;
gint count;
gboolean retry;
- GstRTSPMethod method;
+ GstRTSPMethod method = GST_RTSP_INVALID;
count = 0;
do {