xdg-desktop-portal-gtk
xdg-desktop-portal-gtk copied to clipboard
Improve compile warnings
If we can, we should rejig the code to avoid declaring unused arguments and variables; if we can't, we can use G_GNUC_UNUSED to eliminate the warning.
Actually, the compiler warnings situation is not nice. We're currently using warning_level=2 but:
- we should really use
warning_level=3 - we should add more warnings to the Meson baseline
xdg-desktop-portal-gtk is a security boundary, and we should be more careful with the code we're shipping.
We're currently using warning_level=2 but we should really use warning_level=3
My personal opinion is -pedantic contains a lot of pointless annoyances and just including specific warnings has better results.
I agree about pedantic, so even with warning_level=3 I'd drop it with additional compiler warnings; the other option is to add a bunch of warnings ourselves on top of warning_level=2.
Just to clarify, warning_level=3 only adds -Wpedantic:
https://github.com/mesonbuild/meson/blob/ae7a9b0f4430a055ac419c6f1157cbd0e6eed45c/mesonbuild/compilers/c.py#L155-L158