From 516db3f1d0bee38d4b4a961fb696653e6dac91e8 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Tue, 28 Jul 2020 18:46:30 +0300 Subject: [PATCH] auparse: fix compiler warnings GCC 10 was complaining like following. It really is complaining about default cases returning with potentially unitialized *desval, but those cases in the switch should never be hit. ``` ../subprojects/gst-plugins-good/gst/auparse/gstauparse.c: In function 'gst_au_parse_chain': ../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:481:37: error: 'timestamp' may be used uninitialized in this function [-Werror=maybe-uninitialized] 481 | GST_BUFFER_TIMESTAMP (outbuf) = timestamp; ../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:482:36: error: 'duration' may be used uninitialized in this function [-Werror=maybe-uninitialized] 482 | GST_BUFFER_DURATION (outbuf) = duration; ../subprojects/gst-plugins-good/gst/auparse/gstauparse.c:480:34: error: 'offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] 480 | GST_BUFFER_OFFSET (outbuf) = offset; cc1: all warnings being treated as errors ``` Part-of: --- gst/auparse/gstauparse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 78d100a..8fbab09 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -417,9 +417,9 @@ gst_au_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) GstFlowReturn ret = GST_FLOW_OK; GstAuParse *auparse; gint avail, sendnow = 0; - gint64 timestamp; - gint64 duration; - gint64 offset; + gint64 timestamp = 0; + gint64 duration = 0; + gint64 offset = 0; auparse = GST_AU_PARSE (parent); -- 2.7.4