diff --git a/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx b/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
index d419b7e841dba9b88a37f5d5a7f5872463f0b521..41f9305980a8c4e3bbdfb693ce73cbc0d7a43ab0 100644
--- a/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
+++ b/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
@@ -27,14 +27,11 @@
 
 #include "otbVectorImageToMatrixImageFilter.h"
 
-
 namespace otb
 {
 namespace Wrapper
 {
 
-const unsigned int Dimension = 2;
-
 typedef otb::StreamingStatisticsVectorImageFilter<DoubleVectorImageType> StreamingStatisticsVectorImageFilterType;
 
 typedef otb::UnConstrainedLeastSquareImageFilter<DoubleVectorImageType, DoubleVectorImageType, double> UCLSUnmixingFilterType;
diff --git a/Applications/Hyperspectral/otbVertexComponentAnalysis.cxx b/Applications/Hyperspectral/otbVertexComponentAnalysis.cxx
index 5cf08ee534fa59d91cd38cf3ca2cef4e451d4a0c..06682589290d6c73b28d90795dabe565d2c1e054 100644
--- a/Applications/Hyperspectral/otbVertexComponentAnalysis.cxx
+++ b/Applications/Hyperspectral/otbVertexComponentAnalysis.cxx
@@ -21,13 +21,11 @@
 #include "otbVcaImageFilter.h"
 #include "otbVectorImageToMatrixImageFilter.h"
 
-
 namespace otb
 {
 namespace Wrapper
 {
 
-const unsigned int Dimension = 2;
 
 typedef otb::VCAImageFilter<DoubleVectorImageType>                 VCAFilterType;
 typedef otb::VectorImageToMatrixImageFilter<DoubleVectorImageType> VectorImageToMatrixImageFilterType;
diff --git a/Code/DisparityMap/otbBijectionCoherencyFilter.txx b/Code/DisparityMap/otbBijectionCoherencyFilter.txx
index ed2f32b8bd14f7fb7c5563d1141e0d098ca0ec9c..1723af892e84cbf9a3b929cc285ec7c96fa2fbbc 100644
--- a/Code/DisparityMap/otbBijectionCoherencyFilter.txx
+++ b/Code/DisparityMap/otbBijectionCoherencyFilter.txx
@@ -251,13 +251,18 @@ BijectionCoherencyFilter<TDisparityImage,TOutputImage>
     if (directVmap) tmpIndex[1] += directVertiIter.Get();
 
     // Interpolate in reverse disparity map
+    typedef typename IndexType::IndexValueType IndexValueType;
     IndexType ul,ur,ll,lr;
     ul[0] = static_cast<long>(vcl_floor(tmpIndex[0]));
     ul[1] = static_cast<long>(vcl_floor(tmpIndex[1]));
-    if (ul[0]<buffered.GetIndex()[0]) ul[0]=buffered.GetIndex()[0];
-    if (ul[1]<buffered.GetIndex()[1]) ul[1]=buffered.GetIndex()[1];
-    if (ul[0]>(unsigned int)(buffered.GetIndex()[0]+buffered.GetSize()[0]-1)) ul[0]=(buffered.GetIndex()[0]+buffered.GetSize()[0]-1);
-    if (ul[1]>(unsigned int)(buffered.GetIndex()[1]+buffered.GetSize()[1]-1)) ul[1]=(buffered.GetIndex()[1]+buffered.GetSize()[1]-1);
+    if (ul[0] < buffered.GetIndex()[0])
+      ul[0] = buffered.GetIndex()[0];
+    if (ul[1] < buffered.GetIndex()[1])
+      ul[1] = buffered.GetIndex()[1];
+    if (ul[0] > static_cast<IndexValueType>(buffered.GetIndex()[0] + buffered.GetSize()[0]-1))
+      ul[0]=(buffered.GetIndex()[0]+buffered.GetSize()[0]-1);
+    if (ul[1] > static_cast<IndexValueType>(buffered.GetIndex()[1] + buffered.GetSize()[1]-1))
+      ul[1] = (buffered.GetIndex()[1]+buffered.GetSize()[1]-1);
 
     ur = ul;
     ur[0] += 1;
diff --git a/Code/DisparityMap/otbDisparityTranslateFilter.txx b/Code/DisparityMap/otbDisparityTranslateFilter.txx
index bc37aa9212df768b9c08397596bfbfd32ae5b062..2a0932c883e1c023d439b12bc7cb2b641943ae19 100644
--- a/Code/DisparityMap/otbDisparityTranslateFilter.txx
+++ b/Code/DisparityMap/otbDisparityTranslateFilter.txx
@@ -268,10 +268,12 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
     IndexType ul;
     ul[0] = static_cast<long>(vcl_floor(indexGrid[0]));
     ul[1] = static_cast<long>(vcl_floor(indexGrid[1]));
-    if (ul[0]<gridLargest.GetIndex()[0]) ul[0]=gridLargest.GetIndex()[0];
-    if (ul[1]<gridLargest.GetIndex()[1]) ul[1]=gridLargest.GetIndex()[1];
-    if (ul[0]>(unsigned int)(gridLargest.GetIndex()[0]+gridLargest.GetSize()[0]-2)) ul[0]=(gridLargest.GetIndex()[0]+gridLargest.GetSize()[0]-2);
-    if (ul[1]>(unsigned int)(gridLargest.GetIndex()[1]+gridLargest.GetSize()[1]-2)) ul[1]=(gridLargest.GetIndex()[1]+gridLargest.GetSize()[1]-2);
+    if (ul[0] < gridLargest.GetIndex()[0]) ul[0] = gridLargest.GetIndex()[0];
+    if (ul[1] < gridLargest.GetIndex()[1]) ul[1] = gridLargest.GetIndex()[1];
+    if (ul[0] > static_cast<IndexValueType>(gridLargest.GetIndex()[0] + gridLargest.GetSize()[0]-2))
+      ul[0] = (gridLargest.GetIndex()[0] + gridLargest.GetSize()[0]-2);
+    if (ul[1] > static_cast<IndexValueType>(gridLargest.GetIndex()[1] + gridLargest.GetSize()[1]-2))
+      ul[1] = (gridLargest.GetIndex()[1] + gridLargest.GetSize()[1]-2);
 
     IndexType ur = ul;
     ur[0] += 1;
@@ -365,15 +367,16 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
       leftGrid->TransformPhysicalPointToContinuousIndex(pointSensor, indexGrid);
 
       // Interpolate in left grid
+      typedef typename IndexType::IndexValueType IndexValueType;
       IndexType ul;
       ul[0] = static_cast<long> (vcl_floor(indexGrid[0]));
       ul[1] = static_cast<long> (vcl_floor(indexGrid[1]));
       if (ul[0] < leftLargest.GetIndex()[0]) ul[0] = leftLargest.GetIndex()[0];
       if (ul[1] < leftLargest.GetIndex()[1]) ul[1] = leftLargest.GetIndex()[1];
-      if (ul[0] > (unsigned int) (leftLargest.GetIndex()[0] + leftLargest.GetSize()[0] - 2)) ul[0] = (
-          leftLargest.GetIndex()[0] + leftLargest.GetSize()[0] - 2);
-      if (ul[1] > (unsigned int) (leftLargest.GetIndex()[1] + leftLargest.GetSize()[1] - 2)) ul[1] = (
-          leftLargest.GetIndex()[1] + leftLargest.GetSize()[1] - 2);
+      if (ul[0] > static_cast<IndexValueType>(leftLargest.GetIndex()[0] + leftLargest.GetSize()[0] - 2))
+        ul[0] = (leftLargest.GetIndex()[0] + leftLargest.GetSize()[0] - 2);
+      if (ul[1] > static_cast<IndexValueType>(leftLargest.GetIndex()[1] + leftLargest.GetSize()[1] - 2))
+        ul[1] = (leftLargest.GetIndex()[1] + leftLargest.GetSize()[1] - 2);
 
       IndexType ur = ul;
       ur[0] += 1;
@@ -400,10 +403,10 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
       ul[1] = static_cast<long> (vcl_floor(indexEpi[1]));
       if (ul[0] < buffered.GetIndex()[0]) ul[0] = buffered.GetIndex()[0];
       if (ul[1] < buffered.GetIndex()[1]) ul[1] = buffered.GetIndex()[1];
-      if (ul[0] > (unsigned int) (buffered.GetIndex()[0] + buffered.GetSize()[0] - 2)) ul[0] = (buffered.GetIndex()[0]
-          + buffered.GetSize()[0] - 2);
-      if (ul[1] > (unsigned int) (buffered.GetIndex()[1] + buffered.GetSize()[1] - 2)) ul[1] = (buffered.GetIndex()[1]
-          + buffered.GetSize()[1] - 2);
+      if (ul[0] > static_cast<IndexValueType>(buffered.GetIndex()[0] + buffered.GetSize()[0] - 2))
+        ul[0] = (buffered.GetIndex()[0] + buffered.GetSize()[0] - 2);
+      if (ul[1] > static_cast<IndexValueType>(buffered.GetIndex()[1] + buffered.GetSize()[1] - 2))
+        ul[1] = (buffered.GetIndex()[1] + buffered.GetSize()[1] - 2);
 
       ur = ul;
       ur[0] += 1;
@@ -441,10 +444,10 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
         ul[1] = static_cast<long> (vcl_floor(indexGridRight[1]));
         if (ul[0] < rightLargest.GetIndex()[0]) ul[0] = rightLargest.GetIndex()[0];
         if (ul[1] < rightLargest.GetIndex()[1]) ul[1] = rightLargest.GetIndex()[1];
-        if (ul[0] > (unsigned int) (rightLargest.GetIndex()[0] + rightLargest.GetSize()[0] - 2)) ul[0] = (
-            rightLargest.GetIndex()[0] + rightLargest.GetSize()[0] - 2);
-        if (ul[1] > (unsigned int) (rightLargest.GetIndex()[1] + rightLargest.GetSize()[1] - 2)) ul[1] = (
-            rightLargest.GetIndex()[1] + rightLargest.GetSize()[1] - 2);
+        if (ul[0] > static_cast<IndexValueType>(rightLargest.GetIndex()[0] + rightLargest.GetSize()[0] - 2))
+          ul[0] = (rightLargest.GetIndex()[0] + rightLargest.GetSize()[0] - 2);
+        if (ul[1] > static_cast<IndexValueType>(rightLargest.GetIndex()[1] + rightLargest.GetSize()[1] - 2))
+          ul[1] = (rightLargest.GetIndex()[1] + rightLargest.GetSize()[1] - 2);
 
         ur = ul;
         ur[0] += 1;
diff --git a/Code/DisparityMap/otbMulti3DMapToDEMFilter.txx b/Code/DisparityMap/otbMulti3DMapToDEMFilter.txx
index 14b9699036b215d1a619d5b7cfc64407eceab6f3..1b1f76aa9bef66871c1069fb5afa78faeb4982b6 100644
--- a/Code/DisparityMap/otbMulti3DMapToDEMFilter.txx
+++ b/Code/DisparityMap/otbMulti3DMapToDEMFilter.txx
@@ -556,9 +556,9 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::ThreadedGener
   InputInternalPixelType regionLong2 = pointRef[0] + size[0] * step[0];
   InputInternalPixelType regionLat2 = pointRef[1] + size[1] * step[1];
   InputInternalPixelType minLong = std::min(regionLong1, regionLong2);
-  InputInternalPixelType minLat = std::min(regionLat1, regionLat2);
-  InputInternalPixelType maxLong = std::max(regionLong1, regionLong2);
-  InputInternalPixelType maxLat = std::max(regionLat1, regionLat2);
+  // InputInternalPixelType minLat = std::min(regionLat1, regionLat2);
+  // InputInternalPixelType maxLong = std::max(regionLong1, regionLong2);
+  // InputInternalPixelType maxLat = std::max(regionLat1, regionLat2);
 
   TOutputDEMImage * tmpDEM = NULL;
   AccumulatorImageType *tmpAcc = NULL;
diff --git a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx
index dfe736fe0e1f54d96bfccc9af3280991f972292c..0503767b6756ed6d6ff2301984f44b728229e3f9 100644
--- a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx
+++ b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx
@@ -199,16 +199,6 @@ HaralickTexturesImageFunction<TInputImage, TCoordRep>
     pixelVarianceSquared = 1.;
     }
 
-  //Initalize texture variables;
-  PixelValueType energy      = itk::NumericTraits< PixelValueType >::Zero;
-  PixelValueType entropy     = itk::NumericTraits< PixelValueType >::Zero;
-  PixelValueType correlation = itk::NumericTraits< PixelValueType >::Zero;
-  PixelValueType inverseDifferenceMoment      = itk::NumericTraits< PixelValueType >::Zero;
-  PixelValueType inertia             = itk::NumericTraits< PixelValueType >::Zero;
-  PixelValueType clusterShade        = itk::NumericTraits< PixelValueType >::Zero;
-  PixelValueType clusterProminence   = itk::NumericTraits< PixelValueType >::Zero;
-  PixelValueType haralickCorrelation = itk::NumericTraits< PixelValueType >::Zero;
-
   //Compute textures
   constVectorIt = glcVector.begin();
   while( constVectorIt != glcVector.end())
diff --git a/Code/Simulation/otbReduceSpectralResponse.txx b/Code/Simulation/otbReduceSpectralResponse.txx
index e1ef267c7da2bddcd495d28d5b44f7276bba0432..bc76c02312b8c1779735eb5273856c1184aa1c76 100644
--- a/Code/Simulation/otbReduceSpectralResponse.txx
+++ b/Code/Simulation/otbReduceSpectralResponse.txx
@@ -90,7 +90,7 @@ ReduceSpectralResponse<TSpectralResponse , TRSR>
       {
       PrecisionType lambda1 = (*(it-1)).first;
       PrecisionType lambda2 = (*it).first;
-      PrecisionType deltaLambda = lambda2-lambda1;
+//      PrecisionType deltaLambda = lambda2-lambda1;
       ValuePrecisionType rsr1 = (*(it-1)).second;
       ValuePrecisionType rsr2 = (*it).second;
       ValuePrecisionType spectrum1 = (*m_InputSpectralResponse)(lambda1);
diff --git a/Examples/Filtering/GeometriesChangeSpatialReference.cxx b/Examples/Filtering/GeometriesChangeSpatialReference.cxx
index 41a030f56543bc8d28945be7db440275c99724b4..a896631fdfcf0c1db430cf95acfa9b0b3e8704a3 100644
--- a/Examples/Filtering/GeometriesChangeSpatialReference.cxx
+++ b/Examples/Filtering/GeometriesChangeSpatialReference.cxx
@@ -104,7 +104,7 @@ protected:
 
 private:
 
-  virtual OGRSpatialReference*     DoDefineNewLayerSpatialReference(otb::ogr::Layer const& source) const
+  virtual OGRSpatialReference*     DoDefineNewLayerSpatialReference(otb::ogr::Layer const& itkNotUsed(source)) const
     {
     return m_osr.get();
     }
diff --git a/Examples/IO/OGRWrappersExample.cxx b/Examples/IO/OGRWrappersExample.cxx
index 94ff1823b23c8b06bec7c0d4a68875dd92e832c2..23afc27e91695939586b279e3ce22b21686a3916 100644
--- a/Examples/IO/OGRWrappersExample.cxx
+++ b/Examples/IO/OGRWrappersExample.cxx
@@ -265,7 +265,7 @@ AnyListFieldList_t prepareNewFields(
   OGRFeatureDefn /*const*/& defn, otb::ogr::Layer & destLayer)
 {
   AnyListFieldList_t fields;
-  for (size_t i=0, N=defn.GetFieldCount(); i!=N; ++i)
+  for (int i=0, N=defn.GetFieldCount(); i!=N; ++i)
     {
     const char* name = defn.GetFieldDefn(i)->GetNameRef();
     OGRFieldType type  = static_cast<OGRFieldType>(-1);
diff --git a/Examples/Patented/EstimateAffineTransformationExample.cxx b/Examples/Patented/EstimateAffineTransformationExample.cxx
index c138ab45cece1c28516ba09f7e945bcc55cc890e..f79807168adda7f7f4eb9c5df12708e64dc3babd 100644
--- a/Examples/Patented/EstimateAffineTransformationExample.cxx
+++ b/Examples/Patented/EstimateAffineTransformationExample.cxx
@@ -137,14 +137,11 @@ int main(int argc, char* argv[])
   // Software Guide : BeginCodeSnippet
   typedef PointSetType::PointType         PointType;
   typedef std::pair<PointType, PointType> MatchType;
-  typedef std::vector<MatchType>          MatchVectorType;
   typedef EuclideanDistanceMetricMatchingFilterType::LandmarkListType
   LandmarkListType;
 
   typedef PointSetType::PointsContainer    PointsContainerType;
-  typedef PointsContainerType::Iterator    PointsIteratorType;
   typedef PointSetType::PointDataContainer PointDataContainerType;
-  typedef PointDataContainerType::Iterator PointDataIteratorType;
   // Software Guide : EndCodeSnippet
 
   // Software Guide : BeginLatex
diff --git a/Examples/Patented/SIFTDensityExample.cxx b/Examples/Patented/SIFTDensityExample.cxx
index 129773bb2db11c22813ff218e936a40b99782a85..d5859f8793fcc72155bc973ccd8add0625e7c733 100644
--- a/Examples/Patented/SIFTDensityExample.cxx
+++ b/Examples/Patented/SIFTDensityExample.cxx
@@ -48,7 +48,7 @@
 // Software Guide : EndCodeSnippet
 #include "otbImageToSIFTKeyPointSetFilter.h"
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   const char *       infname = argv[1];
   const char *       outfname = argv[2];
diff --git a/Examples/Patented/SIFTDisparityMapEstimation.cxx b/Examples/Patented/SIFTDisparityMapEstimation.cxx
index cc7981e7a5e74b8ce6a299ccf282c58ed2e4f6fb..bada56d8547af8dd6927ab35638be682340c4d81 100644
--- a/Examples/Patented/SIFTDisparityMapEstimation.cxx
+++ b/Examples/Patented/SIFTDisparityMapEstimation.cxx
@@ -128,10 +128,6 @@ int main(int argc, char* argv[])
   typedef EuclideanDistanceMetricMatchingFilterType::LandmarkListType
   LandmarkListType;
 
-  typedef PointSetType::PointsContainer    PointsContainerType;
-  typedef PointsContainerType::Iterator    PointsIteratorType;
-  typedef PointSetType::PointDataContainer PointDataContainerType;
-  typedef PointDataContainerType::Iterator PointDataIteratorType;
   // Software Guide : EndCodeSnippet
 
   // Software Guide : BeginLatex
@@ -318,8 +314,6 @@ int main(int argc, char* argv[])
   //
   // Software Guide : EndLatex
   // Software Guide : BeginCodeSnippet
-  typedef DisplacementSourceType::LandmarkContainerPointer
-  LandmarkContainerPointer;
   typedef DisplacementSourceType::LandmarkContainer
   LandmarkContainerType;
   typedef DisplacementSourceType::LandmarkPointType LandmarkPointType;
diff --git a/Examples/Patented/SIFTExample.cxx b/Examples/Patented/SIFTExample.cxx
index 9cfd05068f48cf2eed80126c655272753db2d9a9..f495b88688aedec8637118dc97c794ac7c7889e1 100644
--- a/Examples/Patented/SIFTExample.cxx
+++ b/Examples/Patented/SIFTExample.cxx
@@ -120,8 +120,6 @@ int main(int argc, char * argv[])
 // Software Guide : BeginCodeSnippet
   typedef PointSetType::PointsContainer    PointsContainerType;
   typedef PointsContainerType::Iterator    PointsIteratorType;
-  typedef PointSetType::PointDataContainer PointDataContainerType;
-  typedef PointDataContainerType::Iterator PointDataIteratorType;
 // Software Guide : EndCodeSnippet
 
 // Software Guide : BeginLatex