diff options
author | David Robillard <d@drobilla.net> | 2022-11-07 05:47:12 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-11-07 06:03:51 -0500 |
commit | c002ebc4245e805d7a2a0ddaf2fd9f6ff58d22a4 (patch) | |
tree | b238cdaba2e4e9eb54a36097bf24273fe14a04a7 | |
parent | 39b9586ee07bf77e8d1042c865876d87d2754e22 (diff) | |
download | chilbert-c002ebc4245e805d7a2a0ddaf2fd9f6ff58d22a4.tar.gz chilbert-c002ebc4245e805d7a2a0ddaf2fd9f6ff58d22a4.tar.bz2 chilbert-c002ebc4245e805d7a2a0ddaf2fd9f6ff58d22a4.zip |
Fix warnings in MacOS build
-rw-r--r-- | meson.build | 6 | ||||
-rw-r--r-- | test/test_hilbert.cpp | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/meson.build b/meson.build index dd01dc8..8d3152c 100644 --- a/meson.build +++ b/meson.build @@ -30,7 +30,11 @@ if get_option('strict') endif cpp_suppressions = [] - if cpp.get_id() == 'gcc' + if cpp.get_id() == 'clang' + cpp_suppressions += [ + '-Wno-padded', + ] + elif cpp.get_id() == 'gcc' cpp_suppressions += [ '-Wno-effc++', '-Wno-volatile', diff --git a/test/test_hilbert.cpp b/test/test_hilbert.cpp index a83ee33..d2db1e1 100644 --- a/test/test_hilbert.cpp +++ b/test/test_hilbert.cpp @@ -11,9 +11,22 @@ #include "chilbert/StaticBitVec.hpp" #include "chilbert/chilbert.ipp" +#if defined(__clang__) +_Pragma("clang diagnostic push") +_Pragma("clang diagnostic ignored \"-Wcovered-switch-default\"") +_Pragma("clang diagnostic ignored \"-Wdouble-promotion\"") +_Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"") +_Pragma("clang diagnostic ignored \"-Wsign-conversion\"") +_Pragma("clang diagnostic ignored \"-Wzero-as-null-pointer-constant\"") +#endif + #include <gmp.h> #include <gmpxx.h> +#if defined(__clang__) +_Pragma("clang diagnostic pop") +#endif + #include <array> #include <cassert> #include <climits> |