]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix clang 10 warnings
authorTimo Heister <timo.heister@gmail.com>
Thu, 26 Mar 2020 20:59:34 +0000 (16:59 -0400)
committerTimo Heister <timo.heister@gmail.com>
Thu, 26 Mar 2020 21:29:42 +0000 (17:29 -0400)
bundled/boost-1.70.0/libs/iostreams/src/CMakeLists.txt
bundled/boost-1.70.0/libs/serialization/src/CMakeLists.txt
bundled/tbb-2018_U2/src/CMakeLists.txt
include/deal.II/base/table_handler.h
include/deal.II/numerics/matrix_creator.templates.h
source/distributed/cell_weights.cc

index beffdb5fd576ca55af6f2b7207452b02a39f4a51..7162b575b5c62a7f249ebc5f426a56df709f65f1 100644 (file)
@@ -26,4 +26,7 @@ SET(src_boost_iostreams
     zlib.cpp
     )
 
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS -Wno-deprecated-copy)
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS -Wno-c11-extensions)
+
 DEAL_II_ADD_LIBRARY(obj_boost_iostreams OBJECT ${src_boost_iostreams})
index ed6ba9dc58d088b47825a2360aec2cb7e92fb0c1..bb77b0731c120efc4a92f376b3efa5169a1d7c20 100644 (file)
@@ -59,5 +59,7 @@ SET(src_boost_serialization
   xml_wiarchive.cpp
   xml_woarchive.cpp
   )
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS -Wno-deprecated-copy)
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS -Wno-c11-extensions)
 
 DEAL_II_ADD_LIBRARY(obj_boost_serialization OBJECT ${src_boost_serialization})
index d87920a23460cbef8cbb590c2c9ee7876eb979a3..308d6ebcddfbe7373e79ce9aa1ac14b47f5aeebb 100644 (file)
@@ -34,14 +34,12 @@ STRIP_FLAG(DEAL_II_CXX_FLAGS "-pedantic")
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-flifetime-dse=1")
 
 #
-# Disable all fallthrough warnings:
+# Disable other warnings:
 #
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wimplicit-fallthrough=0")
-
-#
-# Disable string overflow warnings (strncpy, ...):
-#
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wstringop-overflow=0")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-deprecated-copy")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wtautological-overlap-compare=0")
 
 
 
index c64bda0c56bcf181acac13c54c122ddb161bb305..63a3f5b014b3a31d71e67c6554d7a4446deb0470 100644 (file)
 
 #include <deal.II/base/exceptions.h>
 
+DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
 #include <boost/serialization/map.hpp>
 #include <boost/serialization/split_member.hpp>
 #include <boost/serialization/string.hpp>
 #include <boost/serialization/vector.hpp>
 #include <boost/variant.hpp>
+DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 
 #include <fstream>
 #include <map>
index b24a74b452f510244c7d33d768f426ae69535eff..aeb070944b046d73beac6e9a7807c1120c2c8b8b 100644 (file)
@@ -667,8 +667,6 @@ namespace MatrixCreator
       {
         CopyData();
 
-        CopyData(CopyData const &data);
-
         unsigned int                                  dofs_per_cell;
         std::vector<types::global_dof_index>          dofs;
         std::vector<std::vector<bool>>                dof_is_on_face;
@@ -684,15 +682,6 @@ namespace MatrixCreator
       {}
 
 
-      template <typename DoFHandlerType, typename number>
-      CopyData<DoFHandlerType, number>::CopyData(CopyData const &data)
-        : dofs_per_cell(data.dofs_per_cell)
-        , dofs(data.dofs)
-        , dof_is_on_face(data.dof_is_on_face)
-        , cell(data.cell)
-        , cell_matrix(data.cell_matrix)
-        , cell_vector(data.cell_vector)
-      {}
     } // namespace AssemblerBoundary
   }   // namespace internal
 } // namespace MatrixCreator
index 2980844f317db83f2d34d8328397ad29bef9244b..c6c796695c067c0330d5387b5b3fb30f6d516c4d 100644 (file)
@@ -86,7 +86,9 @@ namespace parallel
         std::trunc(coefficients.first *
                    std::pow(future_fe.dofs_per_cell, coefficients.second));
 
-      Assert(result >= 0 && result <= std::numeric_limits<unsigned int>::max(),
+      Assert(result >= 0. &&
+               result <=
+                 static_cast<float>(std::numeric_limits<unsigned int>::max()),
              ExcMessage(
                "Cannot cast determined weight for this cell to unsigned int!"));
 
@@ -109,7 +111,9 @@ namespace parallel
         result += pair.first * std::pow(future_fe.dofs_per_cell, pair.second);
       result = std::trunc(result);
 
-      Assert(result >= 0 && result <= std::numeric_limits<unsigned int>::max(),
+      Assert(result >= 0. &&
+               result <=
+                 static_cast<float>(std::numeric_limits<unsigned int>::max()),
              ExcMessage(
                "Cannot cast determined weight for this cell to unsigned int!"));
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.