1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
# Copyright 2020-2022 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: CC0-1.0 OR ISC
# Project-specific warning suppressions.
#
# This should be used in conjunction with the generic "warnings" sibling that
# enables all reasonable warnings for the compiler. It lives here just to keep
# the top-level meson.build more readable.
#####
# C #
#####
if is_variable('cc')
c_suppressions = []
if get_option('strict')
if cc.get_id() in ['clang', 'emscripten']
c_suppressions += [
'-Wno-bad-function-cast',
'-Wno-covered-switch-default',
'-Wno-declaration-after-statement',
'-Wno-documentation-unknown-command',
'-Wno-double-promotion',
'-Wno-extra-semi-stmt',
'-Wno-float-equal',
'-Wno-implicit-float-conversion',
'-Wno-padded',
'-Wno-shorten-64-to-32',
'-Wno-sign-conversion',
'-Wno-unreachable-code-break',
'-Wno-unused-parameter',
]
elif cc.get_id() == 'gcc'
c_suppressions += [
'-Wno-bad-function-cast',
'-Wno-conversion',
'-Wno-double-promotion',
'-Wno-float-conversion',
'-Wno-float-equal',
'-Wno-format-truncation',
'-Wno-inline',
'-Wno-null-dereference',
'-Wno-padded',
'-Wno-sign-conversion',
'-Wno-strict-overflow',
'-Wno-suggest-attribute=const',
'-Wno-suggest-attribute=pure',
'-Wno-switch-default',
'-Wno-unsuffixed-float-constants',
'-Wno-unused-parameter',
]
endif
endif
if cc.get_id() == 'gcc'
c_suppressions += [
'-Wno-maybe-uninitialized',
]
endif
c_suppressions = cc.get_supported_arguments(c_suppressions)
endif
|