GStreamer 1.0: Fix compiler warnings
Fixes new compiler warnings in the gstreamer 1.0 upgrade
I've split out each warning fix into a separate commit:
- Fix unsigned/signed comparisons, I took the opportunity to refactor a few iteration variables to be local to the loop.
- GCC complains about 'missing braces', which seems to refer to structs which expect an array (or something similar) being initialized with scalar values. This occurs when using
PyObject_HEAD_INIT(NULL)
, which as best I can tell should be the same thing. See https://docs.python.org/3/c-api/structures.html#c.PyObject_HEAD_INIT - Fixes an implicit cast. A
float *
gets cast toCOMPLEX_F *
. Essentially an array of pairs of floats is flattened in a data structure that only seems to support fundamental types. So I cast it directly. Maybe a 2D array would be more appropriate?? - GstURIType changed.
It used to be https://www.freedesktop.org/software/gstreamer-sdk/data/docs/latest/gstreamer-0.10/gstreamer-GstUriHandler.html#GstURIHandlerInterface
Now it's https://www.manpagez.com/html/gstreamer-1.0/gstreamer-1.0-1.10.0/gstreamer-GstUriHandler.php#GstURIHandlerInterface - Here I Maybe went too far:
A functionforward_src_event
didn't necessarily initializesuccess
. This isgstreamer_python_upgrade
code which was somewhat copied from another location to replace needlessly complicated and hard to upgrade code inspiir-O4-EW-development
. However, on fixing this warning, it was clearly a bit broken, so I've reworked it in a way that I think is reliable.
There's only warnings left in bank generation, but that entire directory will be removed in the next MR.
I won't try to build in CIT at this stage...
Tests
/fred/oz996/tdavies/spiir_project/sources/testing/gout/py3/MR97_tests
Edited by Timothy Davies