From 45624a60edbf0f3366c11c745df8b36bed76ea0e Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Fri, 24 Apr 2020 01:00:08 +0200 Subject: [PATCH] Fix a clazy issues of level0 --- src/algebra/BiCGStab.hpp | 1 + src/mesh/ConnectivityDescriptor.hpp | 2 +- src/output/VTKWriter.hpp | 8 +++----- src/scheme/FiniteVolumesEulerUnknowns.hpp | 1 + src/utils/PugsTraits.hpp | 1 + tests/mpi_test_Messenger.cpp | 2 ++ tests/test_Array.cpp | 2 ++ tests/test_ArrayUtils.cpp | 2 ++ tests/test_BiCGStab.cpp | 2 ++ tests/test_CRSMatrix.cpp | 2 ++ tests/test_ItemType.cpp | 2 ++ tests/test_PCG.cpp | 2 ++ tests/test_PugsAssert.cpp | 2 ++ tests/test_RevisionInfo.cpp | 2 ++ tests/test_SparseMatrixDescriptor.cpp | 2 ++ tests/test_TinyMatrix.cpp | 2 ++ tests/test_TinyVector.cpp | 2 ++ tests/test_Vector.cpp | 2 ++ 18 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/algebra/BiCGStab.hpp b/src/algebra/BiCGStab.hpp index fbcfa8103..c931385b2 100644 --- a/src/algebra/BiCGStab.hpp +++ b/src/algebra/BiCGStab.hpp @@ -1,6 +1,7 @@ #ifndef BICG_STAB_HPP #define BICG_STAB_HPP +#include <cmath> #include <iomanip> #include <iostream> diff --git a/src/mesh/ConnectivityDescriptor.hpp b/src/mesh/ConnectivityDescriptor.hpp index 352a664ea..8f26988ea 100644 --- a/src/mesh/ConnectivityDescriptor.hpp +++ b/src/mesh/ConnectivityDescriptor.hpp @@ -1,9 +1,9 @@ #ifndef CONNECTIVITY_DESCRIPTOR_HPP #define CONNECTIVITY_DESCRIPTOR_HPP +#include <mesh/CellType.hpp> #include <mesh/ItemOfItemType.hpp> #include <mesh/RefItemList.hpp> - #include <utils/PugsTraits.hpp> #include <vector> diff --git a/src/output/VTKWriter.hpp b/src/output/VTKWriter.hpp index 17cb61ebc..8118e7434 100644 --- a/src/output/VTKWriter.hpp +++ b/src/output/VTKWriter.hpp @@ -1,15 +1,13 @@ #ifndef VTK_WRITER_HPP #define VTK_WRITER_HPP -#include <mesh/IConnectivity.hpp> - #include <algebra/TinyVector.hpp> - +#include <mesh/CellType.hpp> +#include <mesh/IConnectivity.hpp> #include <mesh/ItemValue.hpp> #include <output/OutputNamedItemValueSet.hpp> -#include <utils/Messenger.hpp> - #include <utils/Exceptions.hpp> +#include <utils/Messenger.hpp> #include <fstream> #include <iomanip> diff --git a/src/scheme/FiniteVolumesEulerUnknowns.hpp b/src/scheme/FiniteVolumesEulerUnknowns.hpp index 6997b63a0..bc55835ed 100644 --- a/src/scheme/FiniteVolumesEulerUnknowns.hpp +++ b/src/scheme/FiniteVolumesEulerUnknowns.hpp @@ -3,6 +3,7 @@ #include <algebra/TinyVector.hpp> #include <mesh/ItemValue.hpp> +#include <scheme/BlockPerfectGas.hpp> template <typename TMeshData> class FiniteVolumesEulerUnknowns diff --git a/src/utils/PugsTraits.hpp b/src/utils/PugsTraits.hpp index 3846e141e..a6b6dd3aa 100644 --- a/src/utils/PugsTraits.hpp +++ b/src/utils/PugsTraits.hpp @@ -1,6 +1,7 @@ #ifndef PUGS_TRAITS_HPP #define PUGS_TRAITS_HPP +#include <cstddef> #include <type_traits> template <size_t N, typename T> diff --git a/tests/mpi_test_Messenger.cpp b/tests/mpi_test_Messenger.cpp index 3ab242677..b044547b8 100644 --- a/tests/mpi_test_Messenger.cpp +++ b/tests/mpi_test_Messenger.cpp @@ -104,6 +104,8 @@ test_allToAll<tri_int>() } // namespace mpi_check +// clazy:excludeall=non-pod-global-static + TEST_CASE("Messenger", "[mpi]") { SECTION("communication info") diff --git a/tests/test_Array.cpp b/tests/test_Array.cpp index 948cfb554..3b8dd4587 100644 --- a/tests/test_Array.cpp +++ b/tests/test_Array.cpp @@ -14,6 +14,8 @@ // Instantiate to ensure full coverage is performed template class Array<int>; +// clazy:excludeall=non-pod-global-static + TEST_CASE("Array", "[utils]") { Array<int> a(10); diff --git a/tests/test_ArrayUtils.cpp b/tests/test_ArrayUtils.cpp index 6a7774e1d..fd34c4e00 100644 --- a/tests/test_ArrayUtils.cpp +++ b/tests/test_ArrayUtils.cpp @@ -7,6 +7,8 @@ #include <algebra/TinyMatrix.hpp> #include <algebra/TinyVector.hpp> +// clazy:excludeall=non-pod-global-static + // Instantiate to ensure full coverage is performed template class Array<int>; diff --git a/tests/test_BiCGStab.cpp b/tests/test_BiCGStab.cpp index a40fa8a4f..b7cb2d3bd 100644 --- a/tests/test_BiCGStab.cpp +++ b/tests/test_BiCGStab.cpp @@ -3,6 +3,8 @@ #include <algebra/BiCGStab.hpp> #include <algebra/CRSMatrix.hpp> +// clazy:excludeall=non-pod-global-static + TEST_CASE("BiCGStab", "[algebra]") { SECTION("no preconditionner") diff --git a/tests/test_CRSMatrix.cpp b/tests/test_CRSMatrix.cpp index 651eb2350..7a7a943d1 100644 --- a/tests/test_CRSMatrix.cpp +++ b/tests/test_CRSMatrix.cpp @@ -5,6 +5,8 @@ // Instantiate to ensure full coverage is performed template class SparseMatrixDescriptor<int, uint8_t>; +// clazy:excludeall=non-pod-global-static + TEST_CASE("CRSMatrix", "[algebra]") { SECTION("matrix size") diff --git a/tests/test_ItemType.cpp b/tests/test_ItemType.cpp index 88e3ad877..98e5d5d11 100644 --- a/tests/test_ItemType.cpp +++ b/tests/test_ItemType.cpp @@ -3,6 +3,8 @@ #include <mesh/ItemType.hpp> #include <utils/PugsMacros.hpp> +// clazy:excludeall=non-pod-global-static + TEST_CASE("ItemType", "[connectivity]") { ItemType node_type = ItemType::node; diff --git a/tests/test_PCG.cpp b/tests/test_PCG.cpp index d0939d327..4b2f2df9b 100644 --- a/tests/test_PCG.cpp +++ b/tests/test_PCG.cpp @@ -3,6 +3,8 @@ #include <algebra/CRSMatrix.hpp> #include <algebra/PCG.hpp> +// clazy:excludeall=non-pod-global-static + TEST_CASE("PCG", "[algebra]") { SECTION("no preconditionner") diff --git a/tests/test_PugsAssert.cpp b/tests/test_PugsAssert.cpp index 9f155fc63..b28ee8814 100644 --- a/tests/test_PugsAssert.cpp +++ b/tests/test_PugsAssert.cpp @@ -4,6 +4,8 @@ #include <string> +// clazy:excludeall=non-pod-global-static + TEST_CASE("PugsAssert", "[utils]") { SECTION("checking for assert error") diff --git a/tests/test_RevisionInfo.cpp b/tests/test_RevisionInfo.cpp index e3becb6cb..64c324c4d 100644 --- a/tests/test_RevisionInfo.cpp +++ b/tests/test_RevisionInfo.cpp @@ -5,6 +5,8 @@ #include <utils/pugs_git_revision.hpp> #include <utils/pugs_version.hpp> +// clazy:excludeall=non-pod-global-static + TEST_CASE("RevisionInfo", "[utils]") { SECTION("checking pugs version") diff --git a/tests/test_SparseMatrixDescriptor.cpp b/tests/test_SparseMatrixDescriptor.cpp index 039ba0824..4e8b90134 100644 --- a/tests/test_SparseMatrixDescriptor.cpp +++ b/tests/test_SparseMatrixDescriptor.cpp @@ -7,6 +7,8 @@ // Instantiate to ensure full coverage is performed template class SparseMatrixDescriptor<int, uint8_t>; +// clazy:excludeall=non-pod-global-static + TEST_CASE("SparseMatrixDescriptor", "[algebra]") { SECTION("SparseRowDescriptor subclass") diff --git a/tests/test_TinyMatrix.cpp b/tests/test_TinyMatrix.cpp index d764a88fc..e0d7ef39d 100644 --- a/tests/test_TinyMatrix.cpp +++ b/tests/test_TinyMatrix.cpp @@ -13,6 +13,8 @@ template class TinyMatrix<2, int>; template class TinyMatrix<3, int>; template class TinyMatrix<4, double>; +// clazy:excludeall=non-pod-global-static + TEST_CASE("TinyMatrix", "[algebra]") { TinyMatrix<3, int> A(1, 2, 3, 4, 5, 6, 7, 8, 9); diff --git a/tests/test_TinyVector.cpp b/tests/test_TinyVector.cpp index f64e2da09..20f1f68be 100644 --- a/tests/test_TinyVector.cpp +++ b/tests/test_TinyVector.cpp @@ -8,6 +8,8 @@ template class TinyVector<1, int>; template class TinyVector<3, int>; +// clazy:excludeall=non-pod-global-static + TEST_CASE("TinyVector", "[algebra]") { TinyVector<3, int> v(1, 2, 3); diff --git a/tests/test_Vector.cpp b/tests/test_Vector.cpp index 9b6730f05..b52ac4523 100644 --- a/tests/test_Vector.cpp +++ b/tests/test_Vector.cpp @@ -7,6 +7,8 @@ // Instantiate to ensure full coverage is performed template class Vector<int>; +// clazy:excludeall=non-pod-global-static + TEST_CASE("Vector", "[algebra]") { SECTION("size") -- GitLab