From d24a2769f091362f5797a5f7c4e9da944496eee1 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 9 Apr 2017 08:58:52 +0200
Subject: [PATCH] fix compile warnings

---
 Geo/discreteFace.cpp                |  2 +-
 Mesh/meshGFaceDelaunayInsertion.cpp |  4 ++--
 Mesh/yamakawa.cpp                   | 25 +++++++++++++++----------
 3 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/Geo/discreteFace.cpp b/Geo/discreteFace.cpp
index ad36b56e56..eaf08902d1 100644
--- a/Geo/discreteFace.cpp
+++ b/Geo/discreteFace.cpp
@@ -974,7 +974,7 @@ void discreteFace::crossField()
 {
 #if defined(HAVE_SOLVER) && defined(HAVE_ANN)
   // linear system
-  linearSystem<double> * lsys;
+  linearSystem<double> * lsys = 0;
 
 #ifdef HAVE_PETSC
   lsys = new linearSystemPETSc<double>;
diff --git a/Mesh/meshGFaceDelaunayInsertion.cpp b/Mesh/meshGFaceDelaunayInsertion.cpp
index 771dd07a3a..9c08e67efa 100644
--- a/Mesh/meshGFaceDelaunayInsertion.cpp
+++ b/Mesh/meshGFaceDelaunayInsertion.cpp
@@ -828,7 +828,7 @@ bool insertVertex(bool force, GFace *gf, MVertex *v, double *param , MTri3 *t,
   else{
     recurFindCavityAniso(gf, shell, cavity, metric, param, t, data);
   }
-  
+
   return insertVertexB(shell, cavity, force, gf, v, param , t,
 		       allTets,
 		       activeTets,
@@ -1059,7 +1059,7 @@ void bowyerWatson(GFace *gf, int MAXPNT,
   //  if (equivalence)_printTris ("before.pos", AllTris.begin(), AllTris.end(), DATA);
   int nbSwaps = edgeSwapPass(gf, AllTris, SWCR_DEL, DATA);
   // _printTris ("after2.pos", AllTris, Us,Vs);
-  //  Msg::Debug("Delaunization of the initial mesh done (%d swaps)", nbSwaps);
+  Msg::Debug("Delaunization of the initial mesh done (%d swaps)", nbSwaps);
 
   if(AllTris.empty()){
     Msg::Error("No triangles in initial mesh");
diff --git a/Mesh/yamakawa.cpp b/Mesh/yamakawa.cpp
index f0266471c6..983fbf4695 100644
--- a/Mesh/yamakawa.cpp
+++ b/Mesh/yamakawa.cpp
@@ -74,9 +74,9 @@ namespace {
   }
 
   // Is this vertex in that hex?
-  bool inclusion(MVertex* vertex, const Hex& hex) {
-    return hex.contains(vertex);
-  }
+  //bool inclusion(MVertex* vertex, const Hex& hex) {
+  //  return hex.contains(vertex);
+  //}
 
   // Is that vertex in that tet?
   bool tet_contains_vertex(MElement* tet, MVertex* v) {
@@ -131,6 +131,7 @@ namespace {
     return is_combinatorially_sliver(tet, hex);
   }
 
+  /*
   double distance(MVertex* v1, MVertex* v2) {
     double val;
     double x, y, z;
@@ -142,6 +143,7 @@ namespace {
     val = sqrt(x*x + y*y + z*z);
     return val;
   }
+  */
 
   double distance(MVertex* v, MVertex* v1, MVertex* v2) {
     double val;
@@ -261,10 +263,12 @@ namespace {
     return true;
   }
 
+  /*
   bool is_vertex_on_gmodel_boundary(MVertex* v) {
     return v->onWhat()->dim() < 3;
   }
-
+  */
+  /*
   bool is_hex_facet_on_gmodel_boundary(const Hex& hex, unsigned int f) {
     int count_boundary_vertices = 0;
     for (unsigned int i = 0; i < 4; ++i) {
@@ -276,7 +280,8 @@ namespace {
     }
     return count_boundary_vertices == 4;
   }
-
+  */
+  /*
   bool is_hex_facet_planar(const Hex& hex, unsigned int facet_id, double max_angle = 15.) {
     std::vector<SPoint3> points(4);
     for (unsigned int v = 0; v < 4; ++v) {
@@ -296,7 +301,7 @@ namespace {
       return true;
     }
   }
-
+  */
   unsigned int nb_tets_sharing_vertices(MVertex* v1, MVertex* v2, MVertex* v3,
     TetMeshConnectivity& tet_mesh)
   {
@@ -3233,13 +3238,13 @@ void PostOp::matchQuadFace(MFace &f, MVertex* v1, MVertex* v2, MVertex* v3)
 {
   MVertex* vertices[3] = { v1, v2, v3 };
   int n = 0, ind = -1;
-  MVertex *v;
+  //MVertex *v;
   for (int i = 0; i < 4; ++i) {
     if (f.getVertex(i) != v1 &&
       f.getVertex(i) != v2 &&
       f.getVertex(i) != v3) {
       ++n;
-      v = f.getVertex(i);
+      //v = f.getVertex(i);
       ind = i;
     }
   }
@@ -6422,7 +6427,7 @@ void Recombinator_Graph::merge_clique(GRegion* gr, cliques_losses_graph<Hex*> &c
   multimap<int, set<Hex*> >::reverse_iterator it_allen = cl.allQ.rend();
   int clique_counter = 0;
   std::set<MElement*> parts;
-  int clique_size = 0;
+  //int clique_size = 0;
 
   for (int i = 0; i < clique_number; i++) {
     it_all++;
@@ -6432,7 +6437,7 @@ void Recombinator_Graph::merge_clique(GRegion* gr, cliques_losses_graph<Hex*> &c
     if (clique_counter >= 1) break;
 
     //cout << "--------------------- clique " << clique_counter << " made of ";
-    clique_size = it_all->second.size();
+    //clique_size = it_all->second.size();
     set<Hex*>::iterator ithex = it_all->second.begin();
     set<Hex*>::iterator ithexen = it_all->second.end();
     double quality = 0.;
-- 
GitLab