From dba63f5b24790d7d56313bb86a61f7f2681796a1 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 7 Mar 2019 03:59:36 +0100 Subject: [PATCH] CxxUtils: Fix compilation/ubsan warnings. Suppress pedwarn from a tbb header. Suppress ubsan warnings from boost::any. --- Control/CxxUtils/share/ubsan.supp | 3 +++ Control/CxxUtils/test/ConcurrentBitset_test.cxx | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Control/CxxUtils/share/ubsan.supp b/Control/CxxUtils/share/ubsan.supp index 77dc9ed56a8..e0ba8742c05 100644 --- a/Control/CxxUtils/share/ubsan.supp +++ b/Control/CxxUtils/share/ubsan.supp @@ -9,3 +9,6 @@ vptr_check:PrepRawDataCollection # Suppress false positives caused by ToolHandle calls from code # generated by cling. vptr_check:ToolHandle + +# Suppress downcast warnings from boost::any. +vptr_check:holder diff --git a/Control/CxxUtils/test/ConcurrentBitset_test.cxx b/Control/CxxUtils/test/ConcurrentBitset_test.cxx index 3b5e985a608..8590fc000c5 100644 --- a/Control/CxxUtils/test/ConcurrentBitset_test.cxx +++ b/Control/CxxUtils/test/ConcurrentBitset_test.cxx @@ -17,14 +17,14 @@ #include "CxxUtils/ConcurrentBitset.h" #include "CxxUtils/checker_macros.h" #include "TestTools/random.h" -// Work around a warning in tbb, found by gcc8. -// Fixed in TBB 2018 U5. -#if defined(__GNUC__) && __GNUC__ >= 8 +// tbb/machine/gcc_generic.h has spurious trailing semicolons after +// the clz() functiosn (as of TBB 2019 U1). +#if defined(__GNUC__) # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wclass-memaccess" +# pragma GCC diagnostic ignored "-Wpedantic" #endif #include "tbb/concurrent_unordered_set.h" -#if defined(__GNUC__) && __GNUC__ >= 8 +#if defined(__GNUC__) # pragma GCC diagnostic pop #endif #include "boost/timer/timer.hpp" -- GitLab