cdparanoia: Ignore compiler warning coming from the cdparanoia header

When trying to build the plugin, GCC starts complaining about issues
with one of the cdparanoia headers and it block us from being able
to build the plugin with Werror.

The current warning in the header look like this:

```
[1/2] Compiling C object subprojects/gst-plugins-base/ext/cdparanoia/libgstcdparanoia.so.p/gstcdparanoiasrc.c.o
In file included from ../subprojects/gst-plugins-base/ext/cdparanoia/gstcdparanoiasrc.h:37,
                 from ../subprojects/gst-plugins-base/ext/cdparanoia/gstcdparanoiasrc.c:31:
/usr/include/cdda/cdda_interface.h:164:3: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  164 |   "Success",
      |   ^~~~~~~~~
...
/usr/include/cdda/cdda_interface.h:163:14: warning: ‘strerror_tr’ defined but not used [-Wunused-variable]
  163 | static char *strerror_tr[]={
      |              ^~~~~~~~~~~
[2/2] Linking target subprojects/gst-plugins-base/ext/cdparanoia/libgstcdparanoia.so
```

Last release of cdparanoia was in 2008, so our best bet for the
time is to ignore the warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3232>
This commit is contained in:
Jordan Petridis 2022-07-06 21:45:24 +03:00 committed by Tim-Philipp Müller
parent 3e4f94db14
commit e144ec015e

View file

@ -29,10 +29,19 @@ if not cdparanoia_found and cdparanoia_option.enabled()
endif
if cdparanoia_found
# The cdda/cdda_interface.h header triggers GCC 12+ warnings which
# then trickle down when we build the plugin with -Werror.
# This wouldn't be needed usually, but cdparanoia's last release
# was in 2008.
extra_args = cc.get_supported_arguments([
'-Wno-discarded-qualifiers',
'-Wno-unused-variable'
])
gstcdparanoia = library('gstcdparanoia',
['gstcdparanoiasrc.c'],
include_directories: [configinc, libsinc],
c_args : gst_plugins_base_args,
c_args : gst_plugins_base_args + extra_args,
dependencies : cdparanoia_deps + glib_deps + [audio_dep, gst_dep, gst_base_dep],
install : true,
install_dir : plugins_install_dir,