diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp
index 7f91547ba47bf04e061a95135f4e59fee4de9b83..9b82c5526aeac43bebf0d7bba72ef7e317e9f0ea 100644
--- a/Geo/GFaceCompound.cpp
+++ b/Geo/GFaceCompound.cpp
@@ -1461,7 +1461,7 @@ GPoint GFaceCompound::point(double par1, double par2) const
 
     //curved PN triangle
     //-------------------------
-    printf("normals size=%d vertex=%d \n", _normals.size(), lt->tri->getVertex(0)->getNum());
+    printf("normals size=%d vertex=%d \n", (int)_normals.size(), lt->tri->getVertex(0)->getNum());
     const SVector3 n1 = _normals[lt->tri->getVertex(0)];
     const SVector3 n2 = _normals[lt->tri->getVertex(1)];
     const SVector3 n3 = _normals[lt->tri->getVertex(2)];
diff --git a/Solver/linearSystemCSR.h b/Solver/linearSystemCSR.h
index a83561e326040a65053e6c0e8be62d015d966b41..3db4c5fffa7e0b45c1faca1570d8f7f0476ea8b4 100644
--- a/Solver/linearSystemCSR.h
+++ b/Solver/linearSystemCSR.h
@@ -113,14 +113,14 @@ class linearSystemCSR : public linearSystem<scalar> {
   {
     for(unsigned int i = 0; i < _b->size(); i++) (*_b)[i] = 0.;
   }
-  virtual double normInfRightHandSide() const{
+  virtual double normInfRightHandSide() const
+  {
     double nor = 0.;
     double temp;
-    for(int i=0;i<_b->size();i++){
+    for(unsigned int i = 0; i < _b->size(); i++){
       temp = (*_b)[i];
-      if(temp<0) temp = -temp;
-      if(nor<temp) nor=temp;
-
+      if(temp < 0) temp = -temp;
+      if(nor < temp) nor = temp;
     }
     return nor;
   }
diff --git a/Solver/linearSystemPETSc.h b/Solver/linearSystemPETSc.h
index 32cc3b0d1c68d39b8c28b49603185fa9b1ccf42a..b2c1568a0cf6462dc771245ffc61aed51af184ec 100644
--- a/Solver/linearSystemPETSc.h
+++ b/Solver/linearSystemPETSc.h
@@ -106,11 +106,11 @@ class linearSystemPETSc : public linearSystem<scalar> {
     val = s;
 #endif
   }
-  virtual double normInfRightHandSide() const {
-  PetscScalar nor;
-  _try(VecNorm(_b,NORM_INFINITY,&nor));
-  return nor;
-
+  virtual double normInfRightHandSide() const
+  {
+    PetscReal nor;
+    _try(VecNorm(_b, NORM_INFINITY, &nor));
+    return nor;
   }
   virtual void addToMatrix(int row, int col, const scalar &val)
   {