clover: eliminate "ignoring attributes on template argument" warning
[mesa.git] / meson.build
index e1a1bb819fa85329059814c71e34887fe5310a5e..4a80d6a55addd232e42ac4c977837c160cdde186 100644 (file)
@@ -893,19 +893,16 @@ foreach a : ['-Werror=implicit-function-declaration',
              '-Werror=incompatible-pointer-types',
              '-Werror=format',
              '-Wformat-security',
+             '-Wno-missing-field-initializers',
+             '-Wno-format-truncation',
              '-fno-math-errno',
-             '-fno-trapping-math', '-Qunused-arguments']
+             '-fno-trapping-math',
+             '-Qunused-arguments']
   if cc.has_argument(a)
     c_args += a
   endif
 endforeach
 
-foreach a : ['missing-field-initializers', 'format-truncation']
-  if cc.has_argument('-W' + a)
-    c_args += '-Wno-' + a
-  endif
-endforeach
-
 c_vis_args = []
 if cc.has_argument('-fvisibility=hidden')
   c_vis_args += '-fvisibility=hidden'
@@ -916,26 +913,22 @@ cpp_args = []
 foreach a : ['-Werror=return-type',
              '-Werror=format',
              '-Wformat-security',
-             '-fno-math-errno', '-fno-trapping-math',
+             '-Wno-non-virtual-dtor',
+             '-Wno-missing-field-initializers',
+             '-Wno-format-truncation',
+             '-fno-math-errno',
+             '-fno-trapping-math',
              '-Qunused-arguments']
   if cpp.has_argument(a)
     cpp_args += a
   endif
 endforeach
 
-# For some reason, the test for -Wno-foo always succeeds with gcc, even if the
-# option is not supported. Hence, check for -Wfoo instead.
-
-foreach a : ['non-virtual-dtor', 'missing-field-initializers', 'format-truncation']
-  if cpp.has_argument('-W' + a)
-    cpp_args += '-Wno-' + a
-  endif
-endforeach
-
 no_override_init_args = []
-foreach a : ['override-init', 'initializer-overrides']
-  if cc.has_argument('-W' + a)
-    no_override_init_args += '-Wno-' + a
+foreach a : ['-Wno-override-init',
+             '-Wno-initializer-overrides']
+  if cc.has_argument(a)
+    no_override_init_args += a
   endif
 endforeach