-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vala C code started printing warnings on 1.4.0 #13023
Comments
(FWIW, it occurs on msys2 as well https://github.com/GeopJr/Tuba/actions/runs/8491999274/job/23264535850?pr=881) |
It intentionally does so due to #12597. Quoting myself from there:
Unfortunately, disabling all warnings is a security vulnerability. Meson has stopped doing it. That being said, it's still possible to specify the warnings you'd like to disable with Unused in particular seems like something that code generators which optimistically generate lots of code that may never get used, could disable via a pragma in code generation. In theory, meson could "just" turn those off instead of the previous I should also note that not all code generators are equal; this is fixable by vala and it was overreach for meson to disable all warnings for e.g. cython too. |
I see, thanks for the info! |
How to disable some C warnings for only Vala-generated code? Is such way exists? Or only hackish one like "split Vala code to static library, and then pass compiler flags to it"? |
Describe the bug
After updating to 1.4.0, compiling Vala projects prints C warnings, specifically:
Wunused-value
Wsign-compare
Wunused-parameter
Wunused-but-set-variable
Wduplicate-decl-specifier
Wunused-variable
Wunused-value
Wunused-function
To Reproduce
will output
Expected behavior
No C warnings should be printed, just like it did prior to 1.4.0
system parameters
meson --version
- 1.4.0ninja --version
if it's a Ninja build - 1.11.1The text was updated successfully, but these errors were encountered: