mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-03-25 17:41:41 +01:00
meson: Disable some warnings when asserts/checks are disabled
Some labels are only used when checks are enabled, and some variables are only used when assertions and/or checks are enabled. Instead of cluttering the code with extra #ifdefs, we silence those warnings: they're harmless in this case. We already do this in Autotools. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
2ca68e9544
commit
ba515347cf
1 changed files with 13 additions and 3 deletions
16
meson.build
16
meson.build
|
|
@ -791,13 +791,10 @@ endif
|
|||
|
||||
if not asserts
|
||||
warning_args += [
|
||||
'-Wno-unused-but-set-variable',
|
||||
'-Wno-unused-variable',
|
||||
'-Wno-unused-function',
|
||||
]
|
||||
endif
|
||||
|
||||
|
||||
checks = get_option('checks')
|
||||
config.set('DBUS_ENABLE_CHECKS', checks ? 1 : false)
|
||||
config.set('DBUS_DISABLE_CHECKS', not checks ? 1 : false)
|
||||
|
|
@ -807,6 +804,19 @@ config.set('HAVE_GIO_UNIX', have_gio_unix ? 1 : false)
|
|||
config.set('GLIB_VERSION_MIN_REQUIRED', 'GLIB_VERSION_2_38')
|
||||
config.set('GLIB_VERSION_MAX_ALLOWED', 'G_ENCODE_VERSION(2,44)')
|
||||
|
||||
if not checks
|
||||
warning_args += [
|
||||
'-Wno-unused-label',
|
||||
]
|
||||
endif
|
||||
|
||||
if not (asserts and checks)
|
||||
warning_args += [
|
||||
'-Wno-unused-but-set-variable',
|
||||
'-Wno-unused-variable',
|
||||
]
|
||||
endif
|
||||
|
||||
windows_output_debug = get_option('windows_output_debug_string')
|
||||
config.set('DBUS_USE_OUTPUT_DEBUG_STRING', windows_output_debug)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue