Skip to content

Commit

Permalink
build: Add more warnings
Browse files Browse the repository at this point in the history
Outside of Meson's default warnings, we really need to step up our
coverage.
  • Loading branch information
ebassi committed Oct 24, 2023
1 parent 1b35948 commit e36d27d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,39 @@ portal_built_sources += gnome.gdbus_codegen('shell-dbus',
],
)

# Add more warnings
cc = meson.get_compiler('c')
portal_c_args += cc.get_supported_arguments([
# We are building GLib code; see toolchain requirements
'-fno-strict-aliasing',

# GResource strings can be arbitrarily long
'-Wno-overlength-strings',

'-Wformat=2',
'-Wformat-non-literal',
'-Wformat-security',
'-Wignored-qualifiers',
'-Wimplicit-function-declaration',
'-Wmisleading-indentation',
'-Wmissing-format-attribute',
'-Wmissing-include-dirs',
'-Wmissing-noreturn',
'-Wnested-externs',
'-Wpointer-arith',
'-Wshadow',
'-Wstrict-prototypes',
'-Wswitch-default',
'-Wswitch-enum',
'-Wundef',
'-Wempty-body',
'-Winit-self',
'-Wmissing-declarations',
'-Wmissing-prototypes',
'-Wredundant-decls',
'-Wwrite-strings',
])

executable('xdg-desktop-portal-gtk',
sources: [
'xdg-desktop-portal-gtk.c',
Expand Down

0 comments on commit e36d27d

Please sign in to comment.