From 39475462081fa9f3a4458f1b85fe79f08500812f Mon Sep 17 00:00:00 2001
From: Wenqing Wang <wenqing.wang@ufz.de>
Date: Fri, 18 May 2018 14:03:12 +0200
Subject: [PATCH] [Warn] Removed two compilation warnings

---
 Applications/ApplicationsLib/ProjectData.cpp                 | 3 +++
 NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.cpp | 5 ++---
 Tests/NumLib/NaturalNodeCoordinates.cpp                      | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp
index bcc18d26a46..2933658f3e2 100644
--- a/Applications/ApplicationsLib/ProjectData.cpp
+++ b/Applications/ApplicationsLib/ProjectData.cpp
@@ -316,6 +316,9 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config,
                                  std::string const& project_directory,
                                  std::string const& output_directory)
 {
+    (void)project_directory; // to avoid compilation warning
+    (void)output_directory; // to avoid compilation warning
+
     DBUG("Reading processes:");
     //! \ogs_file_param{prj__processes__process}
     for (auto process_config : processes_config.getConfigSubtreeList("process"))
diff --git a/NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.cpp b/NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.cpp
index 656051d76b5..c7527be13b2 100644
--- a/NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.cpp
+++ b/NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.cpp
@@ -70,12 +70,11 @@ void LocalLinearLeastSquaresExtrapolator::extrapolate(
 
     if (!_nodal_values ||
 #ifdef USE_PETSC
-        static_cast<std::size_t>(_nodal_values->getLocalSize() +
-                                 _nodal_values->getGhostSize())
+        _nodal_values->getLocalSize() + _nodal_values->getGhostSize()
 #else
         _nodal_values->size()
 #endif
-            != num_nodal_dof_result)
+            != static_cast<GlobalIndexType>(num_nodal_dof_result))
     {
         _nodal_values = MathLib::MatrixVectorTraits<GlobalVector>::newInstance(
             {num_nodal_dof_result, num_nodal_dof_result, &ghost_indices,
diff --git a/Tests/NumLib/NaturalNodeCoordinates.cpp b/Tests/NumLib/NaturalNodeCoordinates.cpp
index 18d6f1a8ede..ad74c36eb57 100644
--- a/Tests/NumLib/NaturalNodeCoordinates.cpp
+++ b/Tests/NumLib/NaturalNodeCoordinates.cpp
@@ -58,7 +58,7 @@ bool test(MeshLib::Element const& element)
             shape_matrices, GlobalDim, false /* axial symmetry */);
 
         auto const& N = shape_matrices.N;
-        for (int p = 0; p < ShapeFunction::NPOINTS; ++p)
+        for (int p = 0; p < static_cast<int>(ShapeFunction::NPOINTS); ++p)
         {
             if (p == n)
             {
-- 
GitLab