From 75872c802b990a59fb327a546543824668d5485e Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Wed, 6 Jul 2022 21:45:24 +0300 Subject: [PATCH] cdparanoia: Ignore compiler warning coming from the cdparanoia header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: --- .../gst-plugins-base/ext/cdparanoia/meson.build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/ext/cdparanoia/meson.build b/subprojects/gst-plugins-base/ext/cdparanoia/meson.build index 66ca358854..3a56340855 100644 --- a/subprojects/gst-plugins-base/ext/cdparanoia/meson.build +++ b/subprojects/gst-plugins-base/ext/cdparanoia/meson.build @@ -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 + [audio_dep, gst_dep, gst_base_dep], install : true, install_dir : plugins_install_dir,