# Copyright 2020-2022 David Robillard # 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