Skip to content

Commit

Permalink
Hide C compiler warnings about unused items, explain some others
Browse files Browse the repository at this point in the history
These are numerous, but harmless -- that's just how Vala → C generation
works. It takes attention away from the more interesting warnings.

Add explanation and bug reference for the others.

Fixes #226
  • Loading branch information
martinpitt committed Mar 3, 2024
1 parent f8fb070 commit 788fdd4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ g_ir_compiler = find_program('g-ir-compiler', required: false)
# generated vala code triggers tons of these
add_project_arguments(
cc.get_supported_arguments(
# Vala doesn't have `const void*`, or a way to selectively #pragma these in the code
'-Wno-error=discarded-qualifiers',
# mostly const dropping and dropped "volatile" in fully autogenerated code;
# upstream Vala does not support fixing this warning
'-Wno-error=incompatible-pointer-types',
# https://gitlab.gnome.org/GNOME/vala/-/issues/1529
'-Wno-error=pointer-sign',
'-Wno-error=unused-but-set-variable',
'-Wno-error=unused-function',
'-Wno-error=unused-label',
'-Wno-error=unused-value',
'-Wno-error=unused-variable'
# "mostly harmless", fallout from Vala C code template generation, C compiler will optimize away
'-Wno-unused-but-set-variable',
'-Wno-unused-function',
'-Wno-unused-label',
'-Wno-unused-value',
'-Wno-unused-variable'
), language: 'c')

# HACK: vala doesn't support declaring const arguments, so we get a lot of errors
Expand Down

0 comments on commit 788fdd4

Please sign in to comment.