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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/671>
This commit is contained in:
Jordan Petridis 2020-07-28 18:46:30 +03:00
parent d997a8d48b
commit 516db3f1d0

View file

@ -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);