diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp
index a2a9a61e2dbfd0ae04fbefa460c92c7c97a672ad..a11b9930f2f89e68be0cf5c7c3f5dd83a801a26b 100644
--- a/Geo/GModel.cpp
+++ b/Geo/GModel.cpp
@@ -1,4 +1,4 @@
-// $Id: GModel.cpp,v 1.83 2008-04-13 09:45:48 geuzaine Exp $
+// $Id: GModel.cpp,v 1.84 2008-04-15 19:02:32 geuzaine Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -72,7 +72,7 @@ GModel *GModel::current(int index)
   if(index >= 0) _current = index;
   if(list.empty()) return 0; // not an error
 
-  if(_current < 0 || _current >= list.size()) return list.back();
+  if(_current < 0 || _current >= (int)list.size()) return list.back();
   return list[_current];
 }
 
diff --git a/Geo/GModelIO_MED.cpp b/Geo/GModelIO_MED.cpp
index d5e6bdf88a6954d90c72ba3815eaef9b22215556..7b6de5c673b5c8c85d4f38ec5d98781fdd045b8a 100644
--- a/Geo/GModelIO_MED.cpp
+++ b/Geo/GModelIO_MED.cpp
@@ -1,4 +1,4 @@
-// $Id: GModelIO_MED.cpp,v 1.28 2008-04-13 20:52:07 geuzaine Exp $
+// $Id: GModelIO_MED.cpp,v 1.29 2008-04-15 19:02:32 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -166,7 +166,7 @@ int GModel::readMED(const std::string &name)
     return 0;
   }
 
-  int ret;
+  int ret = 1;
   // FIXME change all this once we clarify Open/Merge/Clear
   MVertex::resetGlobalNumber();
   MElement::resetGlobalNumber();
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index 5f796719177ce1c528e647d50dc73a51033fac5f..f2c54ea90ffdff53dfa789441f4481548af9aca1 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGFace.cpp,v 1.129 2008-03-26 09:37:49 remacle Exp $
+// $Id: meshGFace.cpp,v 1.130 2008-04-15 19:02:32 geuzaine Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -467,7 +467,6 @@ bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true)
     for(int i = 0; i < doc.numPoints; i++){
       MVertex *here = (MVertex *)doc.points[i].data;
       int num = here->getNum();
-      GEntity *ge = here->onWhat();
       double U, V;
       if(num < 0){ // fake bbox points
         U = bb[-1 - num]->x();
@@ -477,18 +476,7 @@ bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true)
 	U = U_[num];
 	V = V_[num];
       }      
-       BDS_Point *pp = m->add_point(num, U, V, gf);
-//        if(ge->dim() == 0){
-//  	pp->lcBGM() = BGM_MeshSize(ge, 0, 0, here->x(), here->y(), here->z());
-//        }
-//        else if(ge->dim() == 1){
-//  	double u;
-//  	here->getParameter(0,u);
-//  	pp->lcBGM() = BGM_MeshSize(ge, u, 0, here->x(), here->y(), here->z());
-//        }
-//        else
-//  	pp->lcBGM() = 1.e22;      
-//        pp->lc() = pp->lcBGM();
+      m->add_point(num, U, V, gf);
     }
     
     
diff --git a/Mesh/meshGFaceDelaunayInsertion.cpp b/Mesh/meshGFaceDelaunayInsertion.cpp
index fe3b64f0aea6575933ba44d0278210d999c3349d..f72f6ba84185828d311c9c9e584e26c2234053d7 100644
--- a/Mesh/meshGFaceDelaunayInsertion.cpp
+++ b/Mesh/meshGFaceDelaunayInsertion.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGFaceDelaunayInsertion.cpp,v 1.23 2008-03-30 18:39:32 remacle Exp $
+// $Id: meshGFaceDelaunayInsertion.cpp,v 1.24 2008-04-15 19:02:32 geuzaine Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -631,7 +631,7 @@ void gmshBowyerWatson(GFace *gf)
       if(ITER++ % 5000 == 0)
 	Msg(DEBUG1,"%7d points created -- Worst tri radius is %8.3f",
 	    vSizes.size(), worst->getRadius());
-      double center[2],uv[2],metric[3],r2;
+      double center[2],metric[3],r2;
       if (worst->getRadius() < 0.5 * sqrt(2.0)) break;
       circUV(worst->tri(), Us, Vs, center, gf);
       MTriangle *base = worst->tri();
@@ -730,7 +730,7 @@ void gmshBowyerWatsonFrontal(GFace *gf){
 	  vSizes.size(), worst->getRadius());
 
     // compute circum center of that guy
-    double center[2],uv[2],metric[3],r2;
+    double center[2],metric[3],r2;
     MTriangle *base = worst->tri();
     circUV(base, Us, Vs, center, gf);
     double pa[2] = {(Us[base->getVertex(0)->getNum()] + 
@@ -773,7 +773,7 @@ void gmshBowyerWatsonFrontal(GFace *gf){
     const double rhoM  = Extend1dMeshIn2dSurfaces() ? std::min(rhoM1, rhoM2) : rhoM2;
     
 
-    double ps = dir[0]*(P[0]-Q[0]) + dir[1]*(P[1]-Q[1]) ;
+    //double ps = dir[0]*(P[0]-Q[0]) + dir[1]*(P[1]-Q[1]) ;
     //    printf("ratio = %12.5E dir %g %g m %g %g %g %g ps = %12.5E\n",RATIO,dir[0],dir[1],metric[0],metric[1],metric[2],rhoM*sqrt(3.),ps); 
 
     //    const double rhoM_hat = std::max(rhoM,2*p);
@@ -831,7 +831,7 @@ void gmshBowyerWatsonFrontal2(GFace *gf){
 	Msg(DEBUG1,"%7d points created -- Worst tri radius is %8.3f",
 	    vSizes.size(), worst->getRadius());
       // compute circum center of that guy
-      double center[2],uv[2],metric[3],r2;
+      double center[2],metric[3],r2;
       MTriangle *base = worst->tri();
       circUV(base, Us, Vs, center, gf);
       double pa[2] = {(Us[base->getVertex(0)->getNum()] + 
diff --git a/Plugin/Levelset.cpp b/Plugin/Levelset.cpp
index c9e5199e464d33d5612c62e315e5970df720a310..2283afe211d4a12981add2cb93eb0f6d721661e1 100644
--- a/Plugin/Levelset.cpp
+++ b/Plugin/Levelset.cpp
@@ -1,4 +1,4 @@
-// $Id: Levelset.cpp,v 1.44 2008-04-05 09:21:37 geuzaine Exp $
+// $Id: Levelset.cpp,v 1.45 2008-04-15 19:02:32 geuzaine Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -71,7 +71,7 @@ static void getSimplexDec(int numNodes, int numEdges, int i,
     n0 = pri[i][0]; n1 = pri[i][1]; n2 = pri[i][2]; n3 = pri[i][3]; nn = 4; ne = 6;
     break;
   case 8:
-    n0 = pri[i][0]; n1 = pri[i][1]; n2 = pri[i][2]; n3 = pri[i][3]; nn = 4; ne = 6;
+    n0 = pyr[i][0]; n1 = pyr[i][1]; n2 = pyr[i][2]; n3 = pyr[i][3]; nn = 4; ne = 6;
     break;
   default:
     n0 = 0; n1 = 1; n2 = 2; n3 = 3; nn = numNodes; ne = numEdges;
diff --git a/Post/PViewDataGModel.h b/Post/PViewDataGModel.h
index a87922afc511cb959e6b336fa8e19565deb48cbd..097d59ad9b2ebc843b2d01b6f4dc7c7e71c9c554 100644
--- a/Post/PViewDataGModel.h
+++ b/Post/PViewDataGModel.h
@@ -119,7 +119,7 @@ class stepData{
   }
   std::vector<double> &getGaussPoints(int msh)
   {
-    if(_gaussPoints.size() <= msh) _gaussPoints.resize(msh + 1);
+    if((int)_gaussPoints.size() <= msh) _gaussPoints.resize(msh + 1);
     return _gaussPoints[msh];
   }
 };
diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp
index 357821c759a6d2aa7ffaa70296b30e043dbe543f..7dc6c3e5a2ef013592d66beac53ca7f116cf4c23 100644
--- a/Post/PViewDataGModelIO.cpp
+++ b/Post/PViewDataGModelIO.cpp
@@ -1,4 +1,4 @@
-// $Id: PViewDataGModelIO.cpp,v 1.40 2008-04-06 09:20:17 geuzaine Exp $
+// $Id: PViewDataGModelIO.cpp,v 1.41 2008-04-15 19:02:33 geuzaine Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -212,8 +212,8 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex)
 
   med_int numSteps = 0;
   std::vector<std::pair<int, int> > pairs;
-  for(int i = 0; i < sizeof(entType) / sizeof(entType[0]); i++){
-    for(int j = 0; j < sizeof(eleType) / sizeof(eleType[0]); j++){
+  for(unsigned int i = 0; i < sizeof(entType) / sizeof(entType[0]); i++){
+    for(unsigned int j = 0; j < sizeof(eleType) / sizeof(eleType[0]); j++){
       med_int n = MEDnPasdetemps(fid, name, entType[i], eleType[j]);
       if(n > 0){
 	pairs.push_back(std::pair<int, int>(i, j));
@@ -307,7 +307,7 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex)
 	  }
 	  // we should check that refcoo corresponds to our internal
 	  // reference element
-	  for(unsigned int i = 0; i < gscoo.size(); i++){
+	  for(int i = 0; i < (int)gscoo.size(); i++){
 	    p.push_back(gscoo[i]);
 	    if(i % dim == dim - 1) for(int j = 0; j < 3 - dim; j++) p.push_back(0.); 
 	  }
@@ -362,7 +362,7 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex)
 	  num = startIndex + profile[i];
 	}
 	else{
-	  if(profile[i] == 0 || profile[i] > tags.size()){
+	  if(profile[i] == 0 || profile[i] > (int)tags.size()){
 	    Msg(GERROR, "Wrong index in profile");
 	    return false;
 	  }
diff --git a/Post/PViewDataList.cpp b/Post/PViewDataList.cpp
index 81a0f5335e31c5e3201979a933703866f57ef9cf..be83f62e84d8f1d2dc6b2823d7cdc70b6df242e9 100644
--- a/Post/PViewDataList.cpp
+++ b/Post/PViewDataList.cpp
@@ -1,4 +1,4 @@
-// $Id: PViewDataList.cpp,v 1.21 2008-04-06 09:20:17 geuzaine Exp $
+// $Id: PViewDataList.cpp,v 1.22 2008-04-15 19:02:33 geuzaine Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -453,11 +453,11 @@ void PViewDataList::revertElement(int step, int ent, int ele)
 
   // copy data
   std::vector<double> XYZ(3 * _lastNumNodes);
-  for(int i = 0; i < XYZ.size(); i++)
+  for(unsigned int i = 0; i < XYZ.size(); i++)
     XYZ[i] = _lastXYZ[i];
 
   std::vector<double> V(_lastNumNodes * _lastNumComponents * getNumTimeSteps());
-  for(int i = 0; i < V.size(); i++)
+  for(unsigned int i = 0; i < V.size(); i++)
     V[i] = _lastVal[i];
 
   // reverse node order