aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-05-28 21:08:59 -0400
committerDavid Robillard <d@drobilla.net>2022-05-28 22:06:25 -0400
commit574bf1e11d73059ec5e6099e6806d919e1ac22b0 (patch)
tree58501a867689c2a02da561503f995adde832e202 /test
parent460b036a8b87f5fb939088a56e3fadc5395ec90a (diff)
downloadpugl-574bf1e11d73059ec5e6099e6806d919e1ac22b0.tar.gz
pugl-574bf1e11d73059ec5e6099e6806d919e1ac22b0.tar.bz2
pugl-574bf1e11d73059ec5e6099e6806d919e1ac22b0.zip
Clean up and strengthen warning flags
Diffstat (limited to 'test')
-rw-r--r--test/meson.build9
-rw-r--r--test/test_inline_cpp.cpp23
2 files changed, 18 insertions, 14 deletions
diff --git a/test/meson.build b/test/meson.build
index e16e818..56ec0d7 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -27,11 +27,6 @@ if get_option('strict') and is_variable('cpp')
'-Wno-documentation', # Cairo
'-Wno-documentation-unknown-command', # Cairo
'-Wno-old-style-cast',
- '-Wno-padded',
- ]
- elif cpp.get_id() == 'gcc'
- test_cpp_args += [
- '-Wno-padded',
]
endif
@@ -102,7 +97,7 @@ if cairo_dep.found()
foreach test : cairo_tests
test(test,
executable('test_' + test, 'test_@0@.c'.format(test),
- c_args: test_c_args,
+ c_args: test_c_args + cairo_args,
include_directories: include_directories(includes),
dependencies: [pugl_dep, cairo_backend_dep]),
suite: 'unit')
@@ -181,7 +176,7 @@ elif is_variable('cpp')
]
elif cpp.get_id() == 'msvc'
unified_args += [
- '/wd4464' # relative include path contains '..'
+ '/wd4464', # relative include path contains '..'
]
endif
diff --git a/test/test_inline_cpp.cpp b/test/test_inline_cpp.cpp
index b08656c..5b5278e 100644
--- a/test/test_inline_cpp.cpp
+++ b/test/test_inline_cpp.cpp
@@ -7,10 +7,19 @@
#if defined(__clang__)
# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
+# pragma clang diagnostic ignored "-Wmissing-field-initializers"
# pragma clang diagnostic ignored "-Wold-style-cast"
+# pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
+# if __has_warning("-Wreserved-identifier")
+# pragma clang diagnostic ignored "-Wreserved-identifier"
+# endif
#elif defined(__GNUC__)
# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wconversion"
+# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+# pragma GCC diagnostic ignored "-Wredundant-tags"
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
@@ -44,14 +53,14 @@
# endif
#endif
-#if defined(__clang__)
-# pragma clang diagnostic pop
-#elif defined(__GNUC__)
-# pragma GCC diagnostic pop
-#endif
-
int
main()
{
return 0;
}
+
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#elif defined(__GNUC__)
+# pragma GCC diagnostic pop
+#endif