Debian Codegraph @

meson/suppressions/meson.build

raw
1 # Copyright 2020-2022 David Robillard <[email protected]>
2 # SPDX-License-Identifier: CC0-1.0 OR GPL-2.0-or-later
3
4 # Project-specific warning suppressions.
5 #
6 # This should be used in conjunction with the generic "warnings" sibling that
7 # enables all reasonable warnings for the compiler. It lives here just to keep
8 # the top-level meson.build more readable.
9
10 #######
11 # C++ #
12 #######
13
14 if is_variable('cpp')
15 cpp_suppressions = []
16
17 if get_option('strict')
18 if cpp.get_id() in ['clang', 'emscripten']
19 cpp_suppressions = [
20 '-Wno-double-promotion',
21 '-Wno-enum-float-conversion',
22 '-Wno-float-conversion',
23 '-Wno-float-equal',
24 '-Wno-global-constructors',
25 '-Wno-implicit-float-conversion',
26 '-Wno-old-style-cast',
27 '-Wno-padded',
28 '-Wno-reserved-id-macro',
29 '-Wno-reserved-identifier',
30 '-Wno-shadow-field',
31 '-Wno-shorten-64-to-32',
32 '-Wno-sign-conversion',
33 '-Wno-suggest-destructor-override',
34 '-Wno-suggest-override',
35 '-Wno-unused-macros',
36 '-Wno-unused-parameter',
37 '-Wno-weak-vtables',
38 '-Wno-zero-as-null-pointer-constant',
39 ]
40
41 elif cpp.get_id() == 'gcc'
42 cpp_suppressions = [
43 '-Wno-conversion',
44 '-Wno-deprecated-enum-float-conversion',
45 '-Wno-double-promotion',
46 '-Wno-effc++',
47 '-Wno-float-conversion',
48 '-Wno-float-equal',
49 '-Wno-old-style-cast',
50 '-Wno-padded',
51 '-Wno-suggest-attribute=const',
52 '-Wno-suggest-override',
53 '-Wno-switch-default',
54 '-Wno-unused-macros',
55 '-Wno-unused-parameter',
56 '-Wno-volatile',
57 '-Wno-zero-as-null-pointer-constant',
58 ]
59
60 elif cpp.get_id() == 'msvc'
61 cpp_suppressions = [
62 '/wd4100', # unreferenced formal parameter
63 '/wd4242', # conversion with possible loss of data
64 '/wd4244', # conversion from unsigned long to float
65 '/wd4305', # truncation from double to float
66 '/wd4365', # signed/unsigned mismatch
67 '/wd4514', # unreferenced inline function has been removed
68 '/wd4706', # assignment within conditional expression
69 '/wd4710', # function not inlined
70 '/wd4711', # function selected for automatic inline expansion
71 '/wd4820', # padding added after construct
72 '/wd5045', # will insert Spectre mitigation for memory load
73 '/wd5219', # implicit conversion with possible loss of data
74 '/wd5220', # generated copy/move constructors/operators are not trivial
75 ]
76 endif
77 endif
78
79 cpp_suppressions = cpp.get_supported_arguments(cpp_suppressions)
80 endif