diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp
index 9e73180a24c106c081c5ae2de6b38396c92fa55a..73e61785d8df97f17a612048e2adc662a3363497 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 7ffe58aab1029da37d51d21a2d2f121ef3f6b0d0..43abb2118d26f38bf2355d77d9d94d691149b977 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 4e476d53779d2b11da05844882965cf55f84ea22..82aa9f84baef91b62ba300dde6bafc327ed8c173 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 
 */