From c002ebc4245e805d7a2a0ddaf2fd9f6ff58d22a4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 7 Nov 2022 05:47:12 -0500 Subject: Fix warnings in MacOS build --- meson.build | 6 +++++- test/test_hilbert.cpp | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) 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 #include +#if defined(__clang__) +_Pragma("clang diagnostic pop") +#endif + #include #include #include -- cgit v1.2.1