From df5919ab388fc4e9ec52d2a81f05ebab1c8b34a0 Mon Sep 17 00:00:00 2001
From: Eric Bechet <eric.bechet@ulg.ac.be>
Date: Mon, 6 Jun 2016 10:13:24 +0000
Subject: [PATCH] warning hunt...

---
 Common/OpenFile.cpp      | 3 +++
 Plugin/CurvedBndDist.cpp | 3 ++-
 contrib/gmm/gmm_std.h    | 4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp
index 9e73180a24..73e61785d8 100644
--- a/Common/OpenFile.cpp
+++ b/Common/OpenFile.cpp
@@ -277,6 +277,7 @@ void ParseString(const std::string &str, bool inCurrentModelDir)
   }
 }
 
+#if defined(HAVE_ONELAB)
 static std::string getSolverForExtension(const std::string &ext)
 {
   for(int i = 0; i < NUM_SOLVERS; i++){
@@ -286,6 +287,7 @@ static std::string getSolverForExtension(const std::string &ext)
   return "";
 }
 
+
 static int defineSolver(const std::string &name)
 {
   for(int i = 0; i < NUM_SOLVERS; i++){
@@ -295,6 +297,7 @@ static int defineSolver(const std::string &name)
   opt_solver_name(NUM_SOLVERS - 1, GMSH_SET|GMSH_GUI, name);
   return NUM_SOLVERS - 1;
 }
+#endif
 
 int MergeFile(const std::string &fileName, bool warnIfMissing, bool setBoundingBox,
               bool importPhysicalsInOnelab)
diff --git a/Plugin/CurvedBndDist.cpp b/Plugin/CurvedBndDist.cpp
index 7ffe58aab1..43abb2118d 100644
--- a/Plugin/CurvedBndDist.cpp
+++ b/Plugin/CurvedBndDist.cpp
@@ -28,6 +28,8 @@ std::string GMSH_CurvedBndDistPlugin::getHelp() const
   return "Plugin(CurvedBndDist) ...";
 }
 
+#if defined(HAVE_OPTHOM)
+
 static void addLine(PViewDataList *data, const SVector3 &p0, const SVector3 &p1, double v0, double v1)
 {
   data->NbSL ++;
@@ -69,7 +71,6 @@ static void addVP(PViewDataList *data, const SVector3 p0, SVector3 v)
 }
 */
 
-#if defined(HAVE_OPTHOM)
 
 #include <limits>
 static void drawElementDist(PViewDataList *data, GEdge *edge,
diff --git a/contrib/gmm/gmm_std.h b/contrib/gmm/gmm_std.h
index 4e476d5377..82aa9f84ba 100644
--- a/contrib/gmm/gmm_std.h
+++ b/contrib/gmm/gmm_std.h
@@ -239,7 +239,9 @@ namespace gmm {
    g++ can issue a warning at each usage of a function declared with this special attribute 
    (also works with typedefs and variable declarations)
 */
-# define IS_DEPRECATED __attribute__ ((__deprecated__))
+//# define IS_DEPRECATED __attribute__ ((__deprecated__))
+// annoying : just including .h files e.g. gmm_precond_ildlt.h generates lots of useless warnings with new 4.6+ gcc.
+# define IS_DEPRECATED
 /*
    the specified function is inlined at any optimization level 
 */
-- 
GitLab