mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-27 05:40:06 +01:00
meson.build: add -Wno-unused-variables when buildling with clang
The test suite makes a lot of use of this pattern: _unref_(ei_event) *ev = peck_ei_event(....) Most of the work is done in the peck function, with the caller just needing cleanup. Unfortunately clang sees this as unused variable and insists on warning about all of them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ca34a091ac
commit
60523606cf
1 changed files with 11 additions and 0 deletions
11
meson.build
11
meson.build
|
|
@ -30,6 +30,17 @@ cflags =[
|
|||
'-Wstrict-overflow=2',
|
||||
'-Wswitch',
|
||||
]
|
||||
|
||||
if cc.get_id() == 'clang'
|
||||
cflags += [
|
||||
# clang doesn't think just using _unref_ is a use of the variable
|
||||
# _unref_(foo) *bar = something_that_gives_a_ref
|
||||
# but we make heavy use of that in the test suite for convenience
|
||||
# of events we know must exist but we don't care about specifically
|
||||
'-Wno-unused-variable',
|
||||
]
|
||||
endif
|
||||
|
||||
add_project_arguments(cc.get_supported_arguments(cflags), language: 'c')
|
||||
|
||||
config_h = configuration_data()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue