From 5679e9dc48ccd4866b1e048a2c83c2c2711779a7 Mon Sep 17 00:00:00 2001
From: Sebastian Eibl <sebastian.eibl@fau.de>
Date: Wed, 6 Jun 2018 12:03:48 +0200
Subject: [PATCH] fixed clang-6.0 warnings

---
 apps/benchmarks/CouetteFlow/CouetteFlow.cpp     | 2 +-
 src/gather/DataProcessor.h                      | 2 ++
 src/mesh/pe/vtk/CommonDataSources.h             | 6 ++++++
 tests/lbm/boundary/SimpleDiffusionDirichlet.cpp | 1 +
 tests/mesh/MeshContainmentOctreeTest.cpp        | 8 ++++----
 5 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/apps/benchmarks/CouetteFlow/CouetteFlow.cpp b/apps/benchmarks/CouetteFlow/CouetteFlow.cpp
index fb9f383b9..b28601c50 100644
--- a/apps/benchmarks/CouetteFlow/CouetteFlow.cpp
+++ b/apps/benchmarks/CouetteFlow/CouetteFlow.cpp
@@ -241,7 +241,7 @@ class BorderRefinementSelection
 public:
 
    BorderRefinementSelection( const Setup & setup, const uint_t level, const real_t bufferDistance ) :
-      setup_( setup ), level_( level ), bufferDistance_( bufferDistance ) {}
+      setup_( setup ), level_( level ), bufferDistance_( bufferDistance ) { WALBERLA_UNUSED(setup_); }
 
    void operator()( SetupBlockForest & forest )
    {
diff --git a/src/gather/DataProcessor.h b/src/gather/DataProcessor.h
index a2efd154a..b337becc9 100644
--- a/src/gather/DataProcessor.h
+++ b/src/gather/DataProcessor.h
@@ -43,6 +43,8 @@ class DataProcessor
 {
    public:
 
+      virtual ~DataProcessor() = default;
+
       /*
        * Process "graph like" data
        * every entry in the outer vector is a data-point.
diff --git a/src/mesh/pe/vtk/CommonDataSources.h b/src/mesh/pe/vtk/CommonDataSources.h
index d2454c15c..bf86f2cdd 100644
--- a/src/mesh/pe/vtk/CommonDataSources.h
+++ b/src/mesh/pe/vtk/CommonDataSources.h
@@ -189,6 +189,8 @@ public:
    LinearVelocityFaceDataSource( const std::string & _name = "linearVelocity" )
       : Base( _name ) { }
 
+   virtual ~LinearVelocityFaceDataSource() = default;
+
    virtual uint_t numComponents() { return uint_t(3); }
 
    virtual void getData( const MeshType & /*mesh*/, const Faces & faces, std::vector<value_type> & data, const BodyPointerFPropManager & bodyPointer )
@@ -249,6 +251,8 @@ public:
    AngularVelocityFaceDataSource( const std::string & _name = "angularVelocity" )
       : Base( _name ) { }
 
+   virtual ~AngularVelocityFaceDataSource() = default;
+
    virtual uint_t numComponents() { return uint_t(3); }
 
    virtual void getData( const MeshType & /*mesh*/, const Faces & faces, std::vector<value_type> & data, const BodyPointerFPropManager & bodyPointer )
@@ -279,6 +283,8 @@ public:
    SurfaceVelocityVertexDataSource( const std::string & _name = "surfaceVelocity" )
       : Base( _name ) { }
 
+   virtual ~SurfaceVelocityVertexDataSource() = default;
+
    virtual uint_t numComponents() { return uint_t(3); }
 
    virtual void getData( const MeshType & mesh, const Vertices & vertices, std::vector<value_type> & data, const BodyPointerVPropManager & bodyPointer )
diff --git a/tests/lbm/boundary/SimpleDiffusionDirichlet.cpp b/tests/lbm/boundary/SimpleDiffusionDirichlet.cpp
index 1cc3e60f9..1d4e95008 100644
--- a/tests/lbm/boundary/SimpleDiffusionDirichlet.cpp
+++ b/tests/lbm/boundary/SimpleDiffusionDirichlet.cpp
@@ -249,6 +249,7 @@ public:
 #ifdef TEST_USES_VTK_OUTPUT
         error_.resize(time_);
 #endif
+        WALBERLA_UNUSED(maxValue_);
 }
 
    void operator()();
diff --git a/tests/mesh/MeshContainmentOctreeTest.cpp b/tests/mesh/MeshContainmentOctreeTest.cpp
index 4e922e17a..40f542ddb 100644
--- a/tests/mesh/MeshContainmentOctreeTest.cpp
+++ b/tests/mesh/MeshContainmentOctreeTest.cpp
@@ -69,9 +69,9 @@ int main( int argc, char * argv[] )
 
    auto aabb = computeAABB( *mesh );
 
-  static const mesh::TriangleMesh::Point xAxis( 1, 0, 0 );
-  static const mesh::TriangleMesh::Point yAxis( 0, 1, 0 );
-  static const mesh::TriangleMesh::Point zAxis( 0, 0, 1 );
+  //static const mesh::TriangleMesh::Point xAxis( 1, 0, 0 );
+  //static const mesh::TriangleMesh::Point yAxis( 0, 1, 0 );
+  //static const mesh::TriangleMesh::Point zAxis( 0, 0, 1 );
   
   mesh::TriangleMesh::Point r = mesh::toOpenMesh( ( aabb.minCorner() - aabb.maxCorner() ).getNormalized() );
   
@@ -124,4 +124,4 @@ int main( int argc, char * argv[] )
 int main( int argc, char * argv[] )
 {
    return walberla::mesh::main( argc, argv );
-}
\ No newline at end of file
+}
-- 
GitLab