Don't warn about unused parameters/variables when compiling generated code
Review Request #3229 — Created June 4, 2024 and submitted — Latest diff uploaded
Don't warn about unused parameters/variables when compiling generated code
When compiling gplugin there are a lot of warnings about unused parameters / variables in code generated by vala and genie, e.g.,
[203/230] Compiling C object vala/tests/genie-plugins/genie-unload-failed-plugin.so.p/meson-generated_unload-failed.c.o unload-failed.c: In function ‘unload_failed_plugin_info_class_init’: unload-failed.c:67:48: warning: unused parameter ‘klass_data’ [-Wunused-parameter] unload-failed.c: In function ‘unload_failed_plugin_info_instance_init’: unload-failed.c:75:67: warning: unused parameter ‘self’ [-Wunused-parameter] unload-failed.c:76:51: warning: unused parameter ‘klass’ [-Wunused-parameter] unload-failed.c: In function ‘gplugin_unload’: unload-failed.c:161:26: warning: unused parameter ‘shutdown’ [-Wunused-parameter]
I don't think those warnings are useful and I didn't find a way to generate
G_GNUC_UNUSED
attributes to selectively silence the warnings.
Compiled without error and with less warnings.